|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgcs.GcsMessage
public abstract class GcsMessage
GcsMessage provides an abstraction for a message, both
Outgoing message should have specified:
Constructor Summary | |
---|---|
protected |
GcsMessage()
Default constructor creates an empty message. |
Method Summary | |
---|---|
abstract void |
addGroup(GcsGroup group)
Adds group to the list of addressees of this message. |
abstract void |
addGroup(java.lang.String group)
Adds group of name group to the list of addressees of this message. |
abstract void |
addGroups(GcsGroup[] groups)
Adds all groups in array groups to the list of addressees of this message. |
abstract void |
addGroups(java.lang.String[] groups)
Adds all groups which names are stored in the groups array to the list of addressees of this message. |
abstract void |
digest(java.io.Serializable object)
Calling this method causes the object specified as the argument to be added to the payload list of this message. |
abstract byte[] |
getData()
Returns the payload as an array of bytes. |
abstract java.util.Vector |
getDigest()
Returns a vector of objects set as a payload with digest(Serializable) method. |
abstract boolean |
getEndianMismatch()
Returns true if there is an endian mismatch between computer which sent the message, and computer which received it. |
abstract GcsGroup[] |
getGroups()
Returns an array of GcsGroup objects representing addresses of this message. |
abstract GcsMembershipInfo |
getMembershipInfo()
Returns membership information for this message if this is a membership message (the isMembership() method returns true). |
abstract java.lang.Object |
getObject()
Returns message payload as an object. |
abstract GcsGroup |
getSender()
Returns the message sender's private group. |
abstract int |
getServiceType()
Returns an integer value representing the message's service type. |
abstract short |
getType()
This method returns the message type. |
abstract boolean |
isAgreed()
Returns true if the message is of agreed guarantee. |
abstract boolean |
isCausal()
Returns true if the message is of causal guarantee. |
abstract boolean |
isFifo()
Returns true if the message is of fifo guarantee. |
abstract boolean |
isIncoming()
Returns true if this is an incoming message. |
abstract boolean |
isMembership()
Returns true if this is a membership message. |
abstract boolean |
isOutgoing()
Returns true if this is an outgoing message. |
abstract boolean |
isRegular()
Returns true if the message is of regular guarantee. |
abstract boolean |
isReject()
Returns true if the message was rejected. |
abstract boolean |
isReliable()
Returns true if the message is of reliable guarantee. |
abstract boolean |
isSafe()
Returns true if the message is of safe guarantee. |
abstract boolean |
isSelfDiscard()
Returns true if this is a self-discard message. |
abstract boolean |
isUnreliable()
Returns true if the message is of reliable guarantee. |
abstract void |
setAgreed()
Sets the message's guarantee to agreed. |
abstract void |
setCausal()
Sets the message's guarantee to causal. |
abstract void |
setData(byte[] data)
Sets data as the message's payload. |
abstract void |
setFifo()
Sets the message's guarantee to fifo. |
abstract void |
setObject(java.io.Serializable object)
Sets given as argument object as a payload for this message. |
abstract void |
setReliable()
Sets the message's guarantee to reliable. |
abstract void |
setSafe()
Sets the message's guarantee to safe. |
abstract void |
setSelfDiscard(boolean selfDiscard)
Used to set the self-discard flag for this method. |
abstract void |
setServiceType(int serviceType)
Sets the service type for this message. |
abstract void |
setType(short type)
Returns the message's type. |
abstract void |
setUnreliable()
Sets the message's guarantee to safe. |
abstract org.jdom.Element |
toXml()
Returns the XML representation of this message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected GcsMessage()
Method Detail |
---|
public abstract void addGroup(GcsGroup group)
getGroups()
.
group
- group to be added to the list of addresseesgetGroups()
public abstract void addGroup(java.lang.String group)
getGroups()
.
group
- name of group to be added to the list of addressespublic abstract void addGroups(GcsGroup[] groups)
getGroups()
.
groups
- array of groups to be added to the list of addressees of this
messagepublic abstract void addGroups(java.lang.String[] groups)
getGroups()
.
groups
- array of names of groups to be added to the list of addressees
of this messagepublic abstract void digest(java.io.Serializable object) throws GcsException
setData(byte[])
or setObject(Serializable)
objects will
be removed.
object
- object to be added
GcsException
- if problem were encountered during reading the objectgetDigest()
public abstract byte[] getData()
digest(Serializable)
or setObject(Serializable)
methods, getDigest()
and getObject()
ought to be used, respectively.
setData(byte[])
public abstract java.util.Vector getDigest() throws GcsException
digest(Serializable)
method.
GcsException
- if errors were encountered during reading the objectsdigest(Serializable)
public abstract boolean getEndianMismatch()
public abstract GcsGroup[] getGroups()
public abstract GcsMembershipInfo getMembershipInfo()
isMembership()
method returns true).
public abstract java.lang.Object getObject() throws GcsException
setObject(Serializable)
.
GcsException
- if difficulties were encountered during reading the messagesetObject(Serializable)
public abstract GcsGroup getSender()
public abstract int getServiceType()
public abstract short getType()
setType(short)
.
setType(short)
public abstract boolean isAgreed()
setAgreed()
public abstract boolean isCausal()
setCausal()
public abstract boolean isFifo()
setFifo()
public abstract boolean isIncoming()
public abstract boolean isMembership()
public abstract boolean isOutgoing()
public abstract boolean isRegular()
public abstract boolean isReject()
public abstract boolean isReliable()
setReliable()
public abstract boolean isSafe()
setSafe()
public abstract boolean isSelfDiscard()
setSelfDiscard(boolean)
.
setSelfDiscard(boolean)
public abstract boolean isUnreliable()
setUnreliable()
public abstract void setAgreed()
isAgreed()
public abstract void setCausal()
isCausal()
public abstract void setData(byte[] data)
getData()
.
data
- data to be set as a payload for this messagegetData()
public abstract void setFifo()
isFifo()
public abstract void setObject(java.io.Serializable object) throws GcsException
getObject()
.
object
- object to be set as a payload for this message
GcsException
- if problems were encountered during reading the objectgetObject()
public abstract void setReliable()
isReliable()
public abstract void setSafe()
isSafe()
public abstract void setSelfDiscard(boolean selfDiscard)
GcsConnection.multicast(GcsMessage)
.
selfDiscard
- determines if the message should self-discard or notisSelfDiscard()
public abstract void setServiceType(int serviceType)
getServiceType()
.
serviceType
- the service type for this messagegetServiceType()
public abstract void setType(short type)
getType()
method should be called.
type
- value which the message should be labeled withgetType()
public abstract void setUnreliable()
isSafe()
public abstract org.jdom.Element toXml()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |