|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface specifying the full-duplex transport used by each end of a Generic Connector connection to communicate with the other end.
An instance of this interface can be communicated to the Generic
Connector using the attribute GenericConnector.MESSAGE_CONNECTION
in the Map
passed
to the constructor or the connect
method.
Method Summary | |
void |
close()
Terminates this object connection. |
void |
connect(Map env)
Establish the connection. |
String |
getConnectionId()
The ID for this connection. |
Message |
readMessage()
Reads a Message object from the other end of the
connection. |
void |
writeMessage(Message msg)
Writes a Message object to the other end of the
connection. |
Method Detail |
public void connect(Map env) throws IOException
Establish the connection. This method must be called before any other method of this interface. The behavior is unspecified if not.
env
- the properties of the connection.
IOException
- if the connection cannot be made.public Message readMessage() throws IOException, ClassNotFoundException
Reads a Message
object from the other end of the
connection.
IOException
- if a message could not be read because
of a communication problem.
ClassNotFoundException
- If the class of a serialized
object cannot be found.public void writeMessage(Message msg) throws IOException
Writes a Message
object to the other end of the
connection.
msg
- the message to be written.
IOException
- if the message could not be written
because of a communication problem.public void close() throws IOException
Terminates this object connection. After calling this
method, any current or new call to readMessage
or writeMessage(Message)
should produce an
IOException
.
IOException
- if an I/O error occurs when closing the
connection. A best effort will have been made to clean up the
connection's resources. The caller will not call any other
methods of this object after close()
, whether or
not it gets IOException
.public String getConnectionId()
The ID for this connection.
|
JMX Remote API Specification 1.0 Final Release Generated from RI build jmxremote-1_0_1_03-b57.1 2005.02.08_17:20:23_MET |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |