|
Joram 5.0.8 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.shared.messages.Message
public final class Message
Implements the Message
data structure.
Field Summary | |
---|---|
static int |
ADMIN
A admin message carries a streamable object. |
byte[] |
body
true if the body is read-only. |
static int |
BYTES
A bytes message carries an array of bytes. |
java.lang.String |
correlationId
The correlation identifier field. |
boolean |
deletedDest
true if the message target destination is deleted. |
static int |
deletedDestFlag
|
int |
deliveryCount
The number of delivery attempts for this message. |
long |
expiration
The message expiration time, by default 0 for infinite time-to-live. |
boolean |
expired
true if the message expired. |
static int |
expiredFlag
|
java.lang.String |
id
The message identifier. |
static int |
MAP
A map message carries an hashtable. |
boolean |
notWriteable
true if the message could not be written on the dest. |
static int |
notWriteableFlag
|
static int |
OBJECT
An object message carries a serializable object. |
Properties |
optionalHeader
Table holding header fields that may be required by particular clients (such as JMS clients). |
boolean |
persistent
true if the message must be persisted. |
static int |
persistentFlag
|
int |
priority
The message priority from 0 to 9, 9 being the highest. |
Properties |
properties
The message properties table. |
boolean |
redelivered
true if the message has been denied at least once by a
consumer. |
static int |
redeliveredFlag
|
java.lang.String |
replyToId
The reply to destination identifier. |
java.lang.String |
replyToType
true if the "reply to" destination is a queue. |
static int |
SIMPLE
A simple message carries an empty body. |
static int |
STREAM
A stream message carries a bytes stream. |
static int |
TEXT
A text message carries a String body. |
long |
timestamp
The message time stamp. |
java.lang.String |
toId
The message destination identifier. |
java.lang.String |
toType
The message destination type. |
int |
type
The client message type: SIMPLE, TEXT, OBJECT, MAP, STREAM, BYTES, ADMIN. |
boolean |
undeliverable
true if the message is considered as undeliverable. |
static int |
undeliverableFlag
|
Constructor Summary | |
---|---|
Message()
Constructs a bright new Message . |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clones the message. |
AbstractAdminMessage |
getAdminMessage()
Returns the AbstractAdminMessage body of the message. |
java.lang.String |
getDestinationId()
Returns the message destination identifier. |
java.lang.String |
getDestinationType()
Returns true if the destination is a queue. |
java.io.Serializable |
getObject()
Returns the object body of the message. |
java.lang.Object |
getOptionalHeader(java.lang.String name)
Returns an optional header field value. |
java.lang.Object |
getProperty(java.lang.String name)
Returns a property as an object. |
java.lang.String |
getReplyToId()
Returns the destination id the reply should be sent to. |
java.lang.String |
getText()
Returns the text body of the message. |
void |
readFrom(java.io.InputStream is)
The object implements the readFrom method to restore its contents from the input stream. |
static java.util.Vector |
readVectorFrom(java.io.InputStream is)
this method allows to read from the input stream a vector of messages. |
java.lang.String |
replyToType()
Returns true if the reply to destination is a queue. |
void |
setAdminMessage(AbstractAdminMessage adminMsg)
Sets an AbstractAdminMessage as the body of the message. |
void |
setDestination(java.lang.String id,
java.lang.String type)
Sets the message destination. |
void |
setObject(java.io.Serializable object)
Sets an object as the body of the message. |
void |
setOptionalHeader(java.lang.String name,
java.lang.Object value)
Sets an optional header field value. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a property value. |
void |
setReplyTo(java.lang.String id,
java.lang.String type)
Sets the destination to which a reply should be sent. |
void |
setText(java.lang.String text)
Sets a String as the body of the message. |
java.util.Hashtable |
soapCode()
|
static Message |
soapDecode(java.util.Hashtable h)
|
java.lang.String |
toString()
|
void |
toString(java.lang.StringBuffer strbuf)
|
void |
writeTo(java.io.OutputStream os)
The object implements the writeTo method to write its contents to the output stream. |
static void |
writeVectorTo(java.util.Vector messages,
java.io.OutputStream os)
this method allows to write to the output stream a vector of message. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public transient Properties optionalHeader
public transient byte[] body
true
if the body is read-only.
public transient Properties properties
public transient java.lang.String id
public transient boolean persistent
true
if the message must be persisted.
public static final int SIMPLE
public static final int TEXT
public static final int OBJECT
public static final int MAP
public static final int STREAM
public static final int BYTES
public static final int ADMIN
public transient int type
public transient int priority
public transient long expiration
public transient long timestamp
public transient boolean redelivered
true
if the message has been denied at least once by a
consumer.
public transient java.lang.String toId
public transient java.lang.String toType
public transient java.lang.String replyToId
public transient java.lang.String replyToType
true
if the "reply to" destination is a queue.
public transient java.lang.String correlationId
public transient boolean deletedDest
true
if the message target destination is deleted.
public transient boolean expired
true
if the message expired.
public transient boolean notWriteable
true
if the message could not be written on the dest.
public transient boolean undeliverable
true
if the message is considered as undeliverable.
public transient int deliveryCount
public static int redeliveredFlag
public static int persistentFlag
public static int deletedDestFlag
public static int expiredFlag
public static int notWriteableFlag
public static int undeliverableFlag
Constructor Detail |
---|
public Message()
Message
.
Method Detail |
---|
public java.lang.Object getOptionalHeader(java.lang.String name)
name
- The header field name.public void setOptionalHeader(java.lang.String name, java.lang.Object value)
name
- The header field name.value
- The corresponding value.public java.lang.Object getProperty(java.lang.String name)
name
- The property name.public void setProperty(java.lang.String name, java.lang.Object value)
name
- The property name.value
- The property value.public final void setDestination(java.lang.String id, java.lang.String type)
id
- The destination identifier.type
- The type of the destination.public final java.lang.String getDestinationId()
public final java.lang.String getDestinationType()
true
if the destination is a queue.
public final java.lang.String getReplyToId()
public final java.lang.String replyToType()
true
if the reply to destination is a queue.
public final void setReplyTo(java.lang.String id, java.lang.String type)
id
- The destination identifier.type
- The destination type.public void setText(java.lang.String text)
public java.lang.String getText()
public void setObject(java.io.Serializable object) throws java.io.IOException
java.io.IOException
- In case of an error while setting the object.public java.io.Serializable getObject() throws java.lang.ClassNotFoundException, java.io.IOException
java.io.IOException
- In case of an error while getting the object.
java.lang.ClassNotFoundException
- If the object class is unknown.public void setAdminMessage(AbstractAdminMessage adminMsg) throws java.io.IOException
java.io.IOException
- In case of an error while setting the object.public AbstractAdminMessage getAdminMessage() throws java.lang.ClassNotFoundException, java.io.IOException
java.io.IOException
- In case of an error while getting the object.
java.lang.ClassNotFoundException
- If the object class is unknown.public final java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuffer strbuf)
public java.lang.Object clone()
clone
in class java.lang.Object
public java.util.Hashtable soapCode()
public static Message soapDecode(java.util.Hashtable h)
public void writeTo(java.io.OutputStream os) throws java.io.IOException
writeTo
in interface Streamable
os
- the stream to write the object to
java.io.IOException
public void readFrom(java.io.InputStream is) throws java.io.IOException
readFrom
in interface Streamable
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeVectorTo(java.util.Vector messages, java.io.OutputStream os) throws java.io.IOException
messages
- the vector of messagesos
- the stream to write the vector to
java.io.IOException
public static java.util.Vector readVectorFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the vector
java.io.IOException
|
Joram 5.0.8 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |