org.jgroups.blocks

Class RequestCorrelator.Header

Enclosing Class:
RequestCorrelator
Implemented Interfaces:
Externalizable, Streamable

public static final class RequestCorrelator.Header
extends Header
implements Streamable

The header for RequestCorrelator messages

Field Summary

static byte
REQ
static byte
RSP
java.util.Stack
callStack
Stack
.
String
corrName
The unique name of the associated RequestCorrelator
java.util.List
dest_mbrs
Contains a list of members who should receive the request (others will drop).
long
id
The id of this request to distinguish among other requests from the same RequestCorrelator
boolean
rsp_expected
msg is synchronous if true
byte
type
Type of header: request or reply

Fields inherited from class org.jgroups.Header

HDR_OVERHEAD

Constructor Summary

Header()
Used for externalization
Header(byte type, long id, boolean rsp_expected, String name)

Method Summary

void
readExternal(ObjectInput in)
void
readFrom(DataInputStream in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
long
size()
String
toString()
void
writeExternal(ObjectOutput out)
void
writeTo(DataOutputStream out)
Write the entire state of the current object (including superclasses) to outstream.

Methods inherited from class org.jgroups.Header

size, toString

Field Details

REQ

public static final byte REQ
Field Value:
0

RSP

public static final byte RSP
Field Value:
1

callStack

public java.util.Stack callStack
Stack
. Contains senders (e.g. P --> Q --> R)

corrName

public String corrName
The unique name of the associated RequestCorrelator

dest_mbrs

public java.util.List dest_mbrs
Contains a list of members who should receive the request (others will drop). Ignored if null

id

public long id
The id of this request to distinguish among other requests from the same RequestCorrelator

rsp_expected

public boolean rsp_expected
msg is synchronous if true

type

public byte type
Type of header: request or reply

Constructor Details

Header

public Header()
Used for externalization

Header

public Header(byte type,
              long id,
              boolean rsp_expected,
              String name)
Parameters:
type - type of header (REQ/RSP)
id - id of this header relative to ids of other requests originating from the same correlator
rsp_expected - whether it's a sync or async request
name - the name of the RequestCorrelator from which

Method Details

readExternal

public void readExternal(ObjectInput in)
            throws IOException,
                   ClassNotFoundException

readFrom

public void readFrom(DataInputStream in)
            throws IOException,
                   IllegalAccessException,
                   InstantiationException
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
Specified by:
readFrom in interface Streamable

size

public long size()
Overrides:
size in interface Header

toString

public String toString()
Overrides:
toString in interface Header

writeExternal

public void writeExternal(ObjectOutput out)
            throws IOException

writeTo

public void writeTo(DataOutputStream out)
            throws IOException
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed
Specified by:
writeTo in interface Streamable

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.