Joram 5.0.7

org.objectweb.joram.kclient
Class Message

java.lang.Object
  extended by org.objectweb.joram.kclient.Message
All Implemented Interfaces:
Streamable

public class Message
extends java.lang.Object
implements Streamable

The Message class defines the Joram's message structure. Joram's messages are composed of the following parts:

Property values are set prior to sending a message. When a client receives a message, its properties are in read-only mode. If a client attempts to set properties at this point, a MessageNotWriteableException is thrown. If clearProperties is called, the properties can now be both read from and written to.
A message selector allows a client to specify, by header field references and property references, the messages it is interested in. Only messages whose header and property values match the selector are delivered.
A message selector matches a message if the selector evaluates to true when the message's header field values and property values are substituted for their corresponding identifiers in the selector.
A message selector is a String whose syntax is based on a subset of the SQL92 conditional expression syntax. If the value of a message selector is an empty string, the value is treated as a null and indicates that there is no message selector for the message consumer.


Field Summary
static int BYTES
          A bytes message carries an array of bytes.
static int deletedDestFlag
           
static int expiredFlag
           
static int MAP
          A map message carries an hashtable.
static int notWriteableFlag
           
static int OBJECT
          An object message carries a serializable object.
static int persistentFlag
           
static int redeliveredFlag
           
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.
static int undeliverableFlag
           
 
Constructor Summary
Message()
          Non API method, should be hidden.
 
Method Summary
 void readFrom(InputXStream is)
          The object implements the readFrom method to restore its contents from the input stream.
 void writeTo(OutputXStream os)
          The object implements the writeTo method to write its contents to the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIMPLE

public static final int SIMPLE
A simple message carries an empty body.

See Also:
Constant Field Values

TEXT

public static final int TEXT
A text message carries a String body.

See Also:
Constant Field Values

OBJECT

public static final int OBJECT
An object message carries a serializable object.

See Also:
Constant Field Values

MAP

public static final int MAP
A map message carries an hashtable.

See Also:
Constant Field Values

STREAM

public static final int STREAM
A stream message carries a bytes stream.

See Also:
Constant Field Values

BYTES

public static final int BYTES
A bytes message carries an array of bytes.

See Also:
Constant Field Values

redeliveredFlag

public static final int redeliveredFlag
See Also:
Constant Field Values

persistentFlag

public static final int persistentFlag
See Also:
Constant Field Values

deletedDestFlag

public static final int deletedDestFlag
See Also:
Constant Field Values

expiredFlag

public static final int expiredFlag
See Also:
Constant Field Values

notWriteableFlag

public static final int notWriteableFlag
See Also:
Constant Field Values

undeliverableFlag

public static final int undeliverableFlag
See Also:
Constant Field Values
Constructor Detail

Message

public Message()
Non API method, should be hidden. Constructs a bright new Message.

Method Detail

writeTo

public void writeTo(OutputXStream os)
             throws java.io.IOException
The object implements the writeTo method to write its contents to the output stream.

Specified by:
writeTo in interface Streamable
Parameters:
os - the stream to write the object to
Throws:
java.io.IOException

readFrom

public void readFrom(InputXStream is)
              throws java.io.IOException
The object implements the readFrom method to restore its contents from the input stream.

Specified by:
readFrom in interface Streamable
Parameters:
is - the stream to read data from in order to restore the object
Throws:
java.io.IOException

Joram 5.0.7

Copyright © 2005 Scalagent - All rights reserved