Logo Search packages:      
Sourcecode: libjgroups-java version File versions

org::jgroups::Message Class Reference

Inheritance diagram for org::jgroups::Message:


List of all members.

Detailed Description

A Message encapsulates data sent to members of a group. It contains among other things the address of the sender, the destination address, a payload (byte buffer) and a list of headers. Headers are added by protocols on the sender side and removed by protocols on the receiver's side.

The byte buffer can point to a reference, and we can subset it using index and length. However, when the message is serialized, we only write the bytes between index and length.

Bela Ban
Message.java,v 2008/01/23 15:00:53 belaban Exp

Definition at line 30 of file Message.java.

Public Member Functions

void clearFlag (byte flag)
Message copy (boolean copy_buffer)
Message copy ()
final byte[] getBuffer ()
Address getDest ()
byte getFlags ()
Header getHeader (String key)
Map< String, HeadergetHeaders ()
int getLength ()
int getNumHeaders ()
final Object getObject ()
int getOffset ()
byte[] getRawBuffer ()
Address getSrc ()
boolean isFlagSet (byte flag)
Message makeReply ()
 Message (boolean create_headers)
 Message (Address dest, Address src, Serializable obj)
 Message (Address dest, Address src, byte[] buf, int offset, int length)
 Message (Address dest, Address src, byte[] buf)
 Message (Address dest)
String printHeaders ()
String printObjectHeaders ()
void putHeader (String key, Header hdr)
Header putHeaderIfAbsent (String key, Header hdr)
void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
void readFrom (DataInputStream in) throws IOException, IllegalAccessException, InstantiationException
Header removeHeader (String key)
final void setBuffer (byte[] b, int offset, int length)
final void setBuffer (byte[] b)
void setDest (Address new_dest)
void setFlag (byte flag)
final void setObject (Serializable obj)
void setSrc (Address new_src)
long size ()
String toString ()
String toStringAsObject ()
void writeExternal (ObjectOutput out) throws IOException
void writeTo (DataOutputStream out) throws IOException

Static Public Attributes

static final byte HIGH_PRIO = 4
static final byte LOW_PRIO = 2
static final byte OOB = 1

Protected Member Functions

Object clone () throws CloneNotSupportedException

Protected Attributes

Address dest_addr = null
final transient
header_lock = new ReentrantReadWriteLock()
Map< String, Headerheaders
transient int length = 0
transient int offset = 0
Address src_addr = null

Static Protected Attributes

static final Log log = LogFactory.getLog(Message.class)

Static Package Functions

 [static initializer]

Static Package Attributes

static final byte BUF_SET = 4
static final byte DEST_SET = 1
static final byte IPADDR_DEST = 16
static final byte IPADDR_SRC = 32
static final Set< Class > nonStreamableHeaders = new HashSet<Class>()
static final byte SRC_HOST_NULL = 64
static final byte SRC_SET = 2

Private Member Functions

String flagsToString ()

Static Private Member Functions

static Address canonicalAddress (Address nonCanonicalAddress)
static Map< String, HeadercreateHeaders (Map< String, Header > m)
static Map< String, HeadercreateHeaders (int size)
static Header readHeader (DataInputStream in) throws IOException
static void writeHeader (Header value, DataOutputStream out) throws IOException

Private Attributes

byte[] buf = null
byte flags = 0

Static Private Attributes

static final ConcurrentHashMap
< Address, Address
canonicalAddresses = new ConcurrentHashMap<Address,Address>()
static final long serialVersionUID = 7966206671974139740L

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index