|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
MessageI is the basic interface used to send and receive message to/from remote server
Comm2J
Method Summary | |
java.lang.Object |
getMessage()
Returns the current message |
java.lang.String |
getName()
Returns the name of the message class |
boolean |
isMessageSet()
Used to know if a message was set (by setMessage or writeMessage) |
java.lang.String |
readHeader(java.io.InputStream is)
Gets the header identifying the message type from the give InputStream |
int |
readMessage(java.io.InputStream is)
Reads a message from give InputStream. |
void |
setMessage(java.lang.Object message)
Sets the message |
java.lang.String |
toString()
Returns a string with the content of the message |
int |
writeHeader(java.io.OutputStream os)
Send an header identifying the message type throw the give OutputStream |
int |
writeMessage(java.io.OutputStream os)
Send current message throw given OutputStream |
Method Detail |
public void setMessage(java.lang.Object message)
message
- Message to be usedpublic java.lang.Object getMessage()
public int readMessage(java.io.InputStream is) throws java.io.IOException
is
- The InputStream used to read datajava.io.IOException
- if an error occourspublic int writeMessage(java.io.OutputStream os) throws java.io.IOException
os
- The OutputStream used to read datajava.io.IOException
- if an error occourspublic boolean isMessageSet()
public int writeHeader(java.io.OutputStream os) throws java.io.IOException
os
- The OutputStream used to read datajava.io.IOException
- if an error occourspublic java.lang.String readHeader(java.io.InputStream is) throws java.io.IOException
is
- The InputStream used to read datajava.io.IOException
- if an error occourspublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |