|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.easybeans.component.smartclient.message.AbsMessage
public abstract class AbsMessage
Abstract class that needs to be used for every message that are exchanged between client and endpoint.
| Field Summary |
|---|
| Fields inherited from interface org.ow2.easybeans.component.smartclient.api.Message |
|---|
HEADER_SIZE, INT_BYTE_SIZE |
| Constructor Summary | |
|---|---|
AbsMessage()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
decode(java.nio.ByteBuffer buffer)
Decode the string encoded in the bytebuffer in UTF-8 format. |
protected java.nio.ByteBuffer |
encode(java.lang.String str)
Encode the given string into a bytebuffer. |
java.nio.ByteBuffer |
getMessage()
Gets a message to send. |
abstract byte |
getOpCode()
Gets the OpCode of this message. |
abstract java.nio.ByteBuffer |
getSubMessage()
Gets the content of this message (only this part, not the header). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbsMessage()
| Method Detail |
|---|
public java.nio.ByteBuffer getMessage()
getMessage in interface Messagepublic abstract byte getOpCode()
getOpCode in interface Messagepublic abstract java.nio.ByteBuffer getSubMessage()
protected java.nio.ByteBuffer encode(java.lang.String str)
str - the given string
protected java.lang.String decode(java.nio.ByteBuffer buffer)
buffer - the given buffer to analyze.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||