|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SMTPClientManager
Interface for the client managers.
Version History
EPG - Adapted from another project - 23 NOV 06
Method Summary | |
---|---|
void |
disconnect()
Force a disconnection. |
void |
init(Logger aLogger,
java.lang.String name,
java.lang.String targetAddress,
int targetPort,
boolean isStreaming,
boolean extensions)
Init the system. |
boolean |
isExtensionsSet()
Are extensions supported? |
RESULT |
meassuredSubmit(java.lang.String senderInet,
java.lang.String recipientInet,
java.lang.String id,
java.io.InputStream... dataStream)
Submit a message and return the result. |
void |
setDSN(DSN dsn)
Set a DSN for all subsequent sends. |
void |
setStreamMax(int max)
Set the maximum number of messages a stream can send before it is closed and reestablished. |
void |
setTimeout(int timeout)
Set a new timeout. |
Reply |
submit(java.lang.String senderInet,
java.lang.String recipientInet,
java.io.InputStream... dataStream)
Submit a message. |
Method Detail |
---|
void init(Logger aLogger, java.lang.String name, java.lang.String targetAddress, int targetPort, boolean isStreaming, boolean extensions) throws ThingsException, java.lang.InterruptedException
aLogger
- name
- targetAddress
- targetPort
- isStreaming
- does it stream? (Streaming attempts to reuse the connection).extensions
- if true, server extensions will be supported.
UserException
ThingsException
java.lang.InterruptedException
void setStreamMax(int max) throws ThingsException, java.lang.InterruptedException
max
- the maximum number. It must be 1 or greater or you'll get an exception.
ThingsException
java.lang.InterruptedException
void setTimeout(int timeout) throws ThingsException
timeout
- in milliseconds.
ThingsException
void setDSN(DSN dsn)
dsn
- the dsnboolean isExtensionsSet()
Reply submit(java.lang.String senderInet, java.lang.String recipientInet, java.io.InputStream... dataStream) throws ThingsException, java.lang.InterruptedException
senderInet
- recipientInet
- dataStream
- InputStreams to be sent in turn. Null entries are allowed and ignored.
ThingsException
- if not successful for any reason. (Don't change this without modifying the other submit methods.)
java.lang.InterruptedException
RESULT meassuredSubmit(java.lang.String senderInet, java.lang.String recipientInet, java.lang.String id, java.io.InputStream... dataStream) throws UserException, java.lang.InterruptedException
A FAULT will result in a Type.EXCEPTION. An ERROR will result in a Type.FAIL. A successful transaction will result in a Type.PASS.
The metrics will contain a valid size giving the actual byte sent in the difference field, as well as count values.
senderInet
- recipientInet
- dataStream
- InputStreams to send in turn.id
- the id of the operations.
UserException
- for any really serious stuff. Most problems will be returned in the RESULT.
java.lang.InterruptedException
void disconnect() throws ThingsException, java.lang.InterruptedException
ThingsException
java.lang.InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |