|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.compatibility.flex.messaging.messages.AbstractMessage
public class AbstractMessage
Base class for all Flex compatibility messages.
Field Summary | |
---|---|
Object |
body
|
String |
clientId
|
protected byte[] |
clientIdBytes
|
String |
destination
|
Map<String,Object> |
headers
|
String |
messageId
|
protected byte[] |
messageIdBytes
|
long |
timestamp
|
long |
timeToLive
|
Fields inherited from interface org.red5.compatibility.flex.messaging.messages.Message |
---|
DESTINATION_CLIENT_ID_HEADER, ENDPOINT_HEADER, FLEX_CLIENT_ID_HEADER, MESSAGING_VERSION, NEEDS_CONFIG_HEADER, POLL_WAIT_HEADER, PRESERVE_DURABLE_HEADER, REMOTE_CREDENTIALS_HEADER, REMOVE_SUBSCRIPTIONS, SELECTOR_HEADER, SUBSCRIPTION_INVALIDATED_HEADER, SUBTOPIC_SEPARATOR, SYNC_HEADER |
Constructor Summary | |
---|---|
AbstractMessage()
Initialize default message fields. |
Method Summary | |
---|---|
protected void |
addParameters(StringBuilder result)
Add message properties to string. |
Object |
getBody()
Returns the body of the message. |
String |
getClientId()
Returns the client id indicating the client that sent the message. |
String |
getDestination()
Returns the destination that the message targets. |
Object |
getHeader(String name)
Returns a header value corresponding to the passed header name. |
Map<String,Object> |
getHeaders()
Returns the headers for the message. |
String |
getMessageId()
Returns the unique message id. |
long |
getTimestamp()
Returns the timestamp for the message. |
long |
getTimeToLive()
Returns the time to live for the message. |
boolean |
headerExists(String name)
Tests whether a header with the passed name exists. |
void |
readExternal(IDataInput input)
|
protected short[] |
readFlags(IDataInput input)
|
void |
setBody(Object value)
Sets the body of the message. |
void |
setClientId(String value)
Sets the client id indicating the client that sent the message. |
void |
setDestination(String value)
Sets the destination that the message targets. |
void |
setHeader(String name,
Object value)
Sets a header on the message. |
void |
setHeaders(Map<String,Object> value)
Sets the headers for the message. |
void |
setMessageId(String value)
Sets the unique message id. |
void |
setTimestamp(long value)
Sets the timestamp for the message. |
void |
setTimeToLive(long value)
Sets the time to live for the message. |
String |
toString()
Return string representation of the message. |
void |
writeExternal(IDataOutput output)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public long timestamp
public Map<String,Object> headers
public Object body
public String messageId
protected byte[] messageIdBytes
public long timeToLive
public String clientId
protected byte[] clientIdBytes
public String destination
Constructor Detail |
---|
public AbstractMessage()
Method Detail |
---|
protected void addParameters(StringBuilder result)
result
- StringBuilder
to add properties topublic Object getBody()
Message
getBody
in interface Message
public String getClientId()
Message
getClientId
in interface Message
public String getDestination()
Message
getDestination
in interface Message
public Object getHeader(String name)
Message
getHeader
in interface Message
public Map<String,Object> getHeaders()
Message
getHeaders
in interface Message
public String getMessageId()
Message
getMessageId
in interface Message
public long getTimestamp()
Message
getTimestamp
in interface Message
public long getTimeToLive()
Message
getTimeToLive
in interface Message
public boolean headerExists(String name)
Message
headerExists
in interface Message
public void setBody(Object value)
Message
setBody
in interface Message
public void setClientId(String value)
Message
setClientId
in interface Message
public void setDestination(String value)
Message
setDestination
in interface Message
public void setHeader(String name, Object value)
Message
setHeader
in interface Message
public void setHeaders(Map<String,Object> value)
Message
setHeaders
in interface Message
public void setMessageId(String value)
Message
setMessageId
in interface Message
public void setTimestamp(long value)
Message
setTimestamp
in interface Message
public void setTimeToLive(long value)
Message
setTimeToLive
in interface Message
public String toString()
toString
in class Object
protected short[] readFlags(IDataInput input)
public void readExternal(IDataInput input)
public void writeExternal(IDataOutput output)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |