MessageConnectionpublic interface MessageConnection A connection handler for generic message receiving and sending. |
Fields Summary |
---|
public static final String | TEXT_MESSAGEConstant designating a message type for text
messages, i.e. value = "text".
When this constant is used for the newMessage() methods
type parameter, the new Message object
will implement the TextMessage interface. | public static final String | BINARY_MESSAGEConstant designating a message type for binary
messages, i.e. value = "binary".
When this constant is used for the newMessage() methods
type parameter, the new Message object
will implement the BinaryMessage interface. | public static final String | MULTIPART_MESSAGEConstant designating a message type for multipart MIME
messages, i.e. value = "multipart".
When this constant is used for the newMessage() methods
type parameter, the new Message object
will implement the MultipartMessage interface. |
Methods Summary |
---|
public void | close()Close the connection.
| public Message | newMessage(java.lang.String type)Constructs a new message object of a specified type.
| public Message | newMessage(java.lang.String type, java.lang.String address)Constructs a new message object of a specified type
initialized with the specified destination address.
| public Message | receive()Receives a message.
If there are no Message s for this
MessageConnection waiting,
this method will block until a message for this Connection
is received, or the MessageConnection is closed.
| public void | send(Message msg)Sends a message.
|
|