|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IProtocolFormatter
Declares functionality to encode/decode messages used for the communication between channels. The implementaton of this interface defines how 'open connection', 'close connection' and 'message data' messages shall be encoded and decoded during communication between channels.
Method Summary | |
---|---|
ProtocolMessage |
decodeMessage(java.io.InputStream readStream)
Decodes message from the stream. |
ProtocolMessage |
decodeMessage(java.lang.Object readMessage)
Decodes message from the given object. |
java.lang.Object |
encodeCloseConnectionMessage(java.lang.String responseReceiverId)
Encodes the close connection request message. |
void |
encodeCloseConnectionMessage(java.lang.String responseReceiverId,
java.io.OutputStream outputSream)
Encodes the close connection request message to the stream. |
java.lang.Object |
encodeMessage(java.lang.String responseReceiverId,
java.lang.Object message)
Encodes the data message. |
void |
encodeMessage(java.lang.String responseReceiverId,
java.lang.Object message,
java.io.OutputStream outputSream)
Encodes the data message into the stream. |
java.lang.Object |
encodeOpenConnectionMessage(java.lang.String responseReceiverId)
Encodes the open connection request message. |
void |
encodeOpenConnectionMessage(java.lang.String responseReceiverId,
java.io.OutputStream outputSream)
Encodes the open connection request message to the stream. |
Method Detail |
---|
java.lang.Object encodeOpenConnectionMessage(java.lang.String responseReceiverId) throws java.lang.Exception
responseReceiverId
- id of the client opening the connection.
java.lang.Exception
void encodeOpenConnectionMessage(java.lang.String responseReceiverId, java.io.OutputStream outputSream) throws java.lang.Exception
responseReceiverId
- id of the client opening the connection.outputSream
- output where the encoded open connection message is written
java.lang.Exception
java.lang.Object encodeCloseConnectionMessage(java.lang.String responseReceiverId) throws java.lang.Exception
responseReceiverId
- id of the client that wants to disconnect or that will be disconnected
java.lang.Exception
void encodeCloseConnectionMessage(java.lang.String responseReceiverId, java.io.OutputStream outputSream) throws java.lang.Exception
responseReceiverId
- id of the client that wants to disconnect or that will be disconnectedoutputSream
- output where the encoded close connection message is written
java.lang.Exception
java.lang.Object encodeMessage(java.lang.String responseReceiverId, java.lang.Object message) throws java.lang.Exception
responseReceiverId
- client id.message
- serialized message to be sent.
java.lang.Exception
void encodeMessage(java.lang.String responseReceiverId, java.lang.Object message, java.io.OutputStream outputSream) throws java.lang.Exception
responseReceiverId
- id of the client that wants to send the message.message
- serialized message to be sent.outputSream
- output where the encoded message is written
java.lang.Exception
ProtocolMessage decodeMessage(java.io.InputStream readStream)
readStream
- stream to be read
ProtocolMessage decodeMessage(java.lang.Object readMessage)
readMessage
- reference to the object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |