|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgcs.GcsMessage
gcsImplementations.spreadGcs.SpreadGcsMessage
public class SpreadGcsMessage
Spread back-end implementation of the GcsMessage
.
GcsMessage
Constructor Summary | |
---|---|
SpreadGcsMessage()
|
Method Summary | |
---|---|
void |
addGroup(GcsGroup group)
Adds group to the list of addressees of this message. |
void |
addGroup(java.lang.String group)
Adds group of name group to the list of addressees of this message. |
void |
addGroups(GcsGroup[] groups)
Adds all groups in array groups to the list of addressees of this message. |
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. |
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. |
byte[] |
getData()
Returns the payload as an array of bytes. |
java.util.Vector |
getDigest()
Returns a vector of objects set as a payload with GcsMessage.digest(Serializable) method. |
boolean |
getEndianMismatch()
Returns true if there is an endian mismatch between computer which sent the message, and computer which received it. |
GcsGroup[] |
getGroups()
Returns an array of GcsGroup objects representing addresses of this message. |
GcsMembershipInfo |
getMembershipInfo()
Returns membership information for this message if this is a membership message (the GcsMessage.isMembership() method returns true). |
java.lang.Object |
getObject()
Returns message payload as an object. |
GcsGroup |
getSender()
Returns the message sender's private group. |
int |
getServiceType()
Returns an integer value representing the message's service type. |
short |
getType()
This method returns the message type. |
boolean |
isAgreed()
Returns true if the message is of agreed guarantee. |
boolean |
isCausal()
Returns true if the message is of causal guarantee. |
boolean |
isFifo()
Returns true if the message is of fifo guarantee. |
boolean |
isIncoming()
Returns true if this is an incoming message. |
boolean |
isMembership()
Returns true if this is a membership message. |
boolean |
isOutgoing()
Returns true if this is an outgoing message. |
boolean |
isRegular()
Returns true if the message is of regular guarantee. |
boolean |
isReject()
Returns true if the message was rejected. |
boolean |
isReliable()
Returns true if the message is of reliable guarantee. |
boolean |
isSafe()
Returns true if the message is of safe guarantee. |
boolean |
isSelfDiscard()
Returns true if this is a self-discard message. |
boolean |
isUnreliable()
Returns true if the message is of reliable guarantee. |
void |
setAgreed()
Sets the message's guarantee to agreed. |
void |
setCausal()
Sets the message's guarantee to causal. |
void |
setData(byte[] data)
Sets data as the message's payload. |
void |
setFifo()
Sets the message's guarantee to fifo. |
void |
setObject(java.io.Serializable object)
Sets given as argument object as a payload for this message. |
void |
setReliable()
Sets the message's guarantee to reliable. |
void |
setSafe()
Sets the message's guarantee to safe. |
void |
setSelfDiscard(boolean selfDiscard)
Used to set the self-discard flag for this method. |
void |
setServiceType(int serviceType)
Sets the service type for this message. |
void |
setType(short type)
Returns the message's type. |
void |
setUnreliable()
Sets the message's guarantee to safe. |
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 |
---|
public SpreadGcsMessage()
Method Detail |
---|
public void addGroup(GcsGroup group)
GcsMessage
GcsMessage.getGroups()
.
addGroup
in class GcsMessage
group
- group to be added to the list of addresseesGcsMessage.getGroups()
public void addGroup(java.lang.String group)
GcsMessage
GcsMessage.getGroups()
.
addGroup
in class GcsMessage
group
- name of group to be added to the list of addressespublic void addGroups(GcsGroup[] groups)
GcsMessage
GcsMessage.getGroups()
.
addGroups
in class GcsMessage
groups
- array of groups to be added to the list of addressees of this
messagepublic void addGroups(java.lang.String[] groups)
GcsMessage
GcsMessage.getGroups()
.
addGroups
in class GcsMessage
groups
- array of names of groups to be added to the list of addressees
of this messagepublic void digest(java.io.Serializable object) throws GcsException
GcsMessage
GcsMessage.setData(byte[])
or GcsMessage.setObject(Serializable)
objects will
be removed.
digest
in class GcsMessage
object
- object to be added
GcsException
- if problem were encountered during reading the objectGcsMessage.getDigest()
public byte[] getData()
GcsMessage
GcsMessage.digest(Serializable)
or GcsMessage.setObject(Serializable)
methods, GcsMessage.getDigest()
and GcsMessage.getObject()
ought to be used, respectively.
getData
in class GcsMessage
GcsMessage.setData(byte[])
public java.util.Vector getDigest() throws GcsException
GcsMessage
GcsMessage.digest(Serializable)
method.
getDigest
in class GcsMessage
GcsException
- if errors were encountered during reading the objectsGcsMessage.digest(Serializable)
public boolean getEndianMismatch()
GcsMessage
getEndianMismatch
in class GcsMessage
public GcsGroup[] getGroups()
GcsMessage
getGroups
in class GcsMessage
public GcsMembershipInfo getMembershipInfo()
GcsMessage
GcsMessage.isMembership()
method returns true).
getMembershipInfo
in class GcsMessage
public java.lang.Object getObject() throws GcsException
GcsMessage
GcsMessage.setObject(Serializable)
.
getObject
in class GcsMessage
GcsException
- if difficulties were encountered during reading the messageGcsMessage.setObject(Serializable)
public GcsGroup getSender()
GcsMessage
getSender
in class GcsMessage
public int getServiceType()
GcsMessage
getServiceType
in class GcsMessage
public short getType()
GcsMessage
GcsMessage.setType(short)
.
getType
in class GcsMessage
GcsMessage.setType(short)
public boolean isAgreed()
GcsMessage
isAgreed
in class GcsMessage
GcsMessage.setAgreed()
public boolean isCausal()
GcsMessage
isCausal
in class GcsMessage
GcsMessage.setCausal()
public boolean isFifo()
GcsMessage
isFifo
in class GcsMessage
GcsMessage.setFifo()
public boolean isIncoming()
GcsMessage
isIncoming
in class GcsMessage
public boolean isMembership()
GcsMessage
isMembership
in class GcsMessage
public boolean isOutgoing()
GcsMessage
isOutgoing
in class GcsMessage
public boolean isReject()
GcsMessage
isReject
in class GcsMessage
public boolean isRegular()
GcsMessage
isRegular
in class GcsMessage
public boolean isReliable()
GcsMessage
isReliable
in class GcsMessage
GcsMessage.setReliable()
public boolean isSafe()
GcsMessage
isSafe
in class GcsMessage
GcsMessage.setSafe()
public boolean isSelfDiscard()
GcsMessage
GcsMessage.setSelfDiscard(boolean)
.
isSelfDiscard
in class GcsMessage
GcsMessage.setSelfDiscard(boolean)
public boolean isUnreliable()
GcsMessage
isUnreliable
in class GcsMessage
GcsMessage.setUnreliable()
public void setAgreed()
GcsMessage
setAgreed
in class GcsMessage
GcsMessage.isAgreed()
public void setCausal()
GcsMessage
setCausal
in class GcsMessage
GcsMessage.isCausal()
public void setData(byte[] data)
GcsMessage
GcsMessage.getData()
.
setData
in class GcsMessage
data
- data to be set as a payload for this messageGcsMessage.getData()
public void setFifo()
GcsMessage
setFifo
in class GcsMessage
GcsMessage.isFifo()
public void setObject(java.io.Serializable object) throws GcsException
GcsMessage
GcsMessage.getObject()
.
setObject
in class GcsMessage
object
- object to be set as a payload for this message
GcsException
- if problems were encountered during reading the objectGcsMessage.getObject()
public void setReliable()
GcsMessage
setReliable
in class GcsMessage
GcsMessage.isReliable()
public void setSafe()
GcsMessage
setSafe
in class GcsMessage
GcsMessage.isSafe()
public void setSelfDiscard(boolean selfDiscard)
GcsMessage
GcsConnection.multicast(GcsMessage)
.
setSelfDiscard
in class GcsMessage
selfDiscard
- determines if the message should self-discard or notGcsMessage.isSelfDiscard()
public void setServiceType(int serviceType)
GcsMessage
GcsMessage.getServiceType()
.
setServiceType
in class GcsMessage
serviceType
- the service type for this messageGcsMessage.getServiceType()
public void setType(short type)
GcsMessage
GcsMessage.getType()
method should be called.
setType
in class GcsMessage
type
- value which the message should be labeled withGcsMessage.getType()
public void setUnreliable()
GcsMessage
setUnreliable
in class GcsMessage
GcsMessage.isSafe()
public org.jdom.Element toXml()
GcsMessage
toXml
in class GcsMessage
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |