|
|||||||||
| 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)
GcsMessageGcsMessage.getGroups().
addGroup in class GcsMessagegroup - group to be added to the list of addresseesGcsMessage.getGroups()public void addGroup(java.lang.String group)
GcsMessageGcsMessage.getGroups().
addGroup in class GcsMessagegroup - name of group to be added to the list of addressespublic void addGroups(GcsGroup[] groups)
GcsMessageGcsMessage.getGroups().
addGroups in class GcsMessagegroups - array of groups to be added to the list of addressees of this
messagepublic void addGroups(java.lang.String[] groups)
GcsMessageGcsMessage.getGroups().
addGroups in class GcsMessagegroups - array of names of groups to be added to the list of addressees
of this message
public void digest(java.io.Serializable object)
throws GcsException
GcsMessageGcsMessage.setData(byte[]) or GcsMessage.setObject(Serializable) objects will
be removed.
digest in class GcsMessageobject - object to be added
GcsException - if problem were encountered during reading the objectGcsMessage.getDigest()public byte[] getData()
GcsMessageGcsMessage.digest(Serializable) or GcsMessage.setObject(Serializable) methods, GcsMessage.getDigest() and GcsMessage.getObject() ought to be used, respectively.
getData in class GcsMessageGcsMessage.setData(byte[])
public java.util.Vector getDigest()
throws GcsException
GcsMessageGcsMessage.digest(Serializable) method.
getDigest in class GcsMessageGcsException - if errors were encountered during reading the objectsGcsMessage.digest(Serializable)public boolean getEndianMismatch()
GcsMessage
getEndianMismatch in class GcsMessagepublic GcsGroup[] getGroups()
GcsMessage
getGroups in class GcsMessagepublic GcsMembershipInfo getMembershipInfo()
GcsMessageGcsMessage.isMembership() method returns true).
getMembershipInfo in class GcsMessage
public java.lang.Object getObject()
throws GcsException
GcsMessageGcsMessage.setObject(Serializable).
getObject in class GcsMessageGcsException - if difficulties were encountered during reading the messageGcsMessage.setObject(Serializable)public GcsGroup getSender()
GcsMessage
getSender in class GcsMessagepublic int getServiceType()
GcsMessage
getServiceType in class GcsMessagepublic short getType()
GcsMessageGcsMessage.setType(short) .
getType in class GcsMessageGcsMessage.setType(short)public boolean isAgreed()
GcsMessage
isAgreed in class GcsMessageGcsMessage.setAgreed()public boolean isCausal()
GcsMessage
isCausal in class GcsMessageGcsMessage.setCausal()public boolean isFifo()
GcsMessage
isFifo in class GcsMessageGcsMessage.setFifo()public boolean isIncoming()
GcsMessage
isIncoming in class GcsMessagepublic boolean isMembership()
GcsMessage
isMembership in class GcsMessagepublic boolean isOutgoing()
GcsMessage
isOutgoing in class GcsMessagepublic boolean isReject()
GcsMessage
isReject in class GcsMessagepublic boolean isRegular()
GcsMessage
isRegular in class GcsMessagepublic boolean isReliable()
GcsMessage
isReliable in class GcsMessageGcsMessage.setReliable()public boolean isSafe()
GcsMessage
isSafe in class GcsMessageGcsMessage.setSafe()public boolean isSelfDiscard()
GcsMessageGcsMessage.setSelfDiscard(boolean) .
isSelfDiscard in class GcsMessageGcsMessage.setSelfDiscard(boolean)public boolean isUnreliable()
GcsMessage
isUnreliable in class GcsMessageGcsMessage.setUnreliable()public void setAgreed()
GcsMessage
setAgreed in class GcsMessageGcsMessage.isAgreed()public void setCausal()
GcsMessage
setCausal in class GcsMessageGcsMessage.isCausal()public void setData(byte[] data)
GcsMessageGcsMessage.getData() .
setData in class GcsMessagedata - data to be set as a payload for this messageGcsMessage.getData()public void setFifo()
GcsMessage
setFifo in class GcsMessageGcsMessage.isFifo()
public void setObject(java.io.Serializable object)
throws GcsException
GcsMessageGcsMessage.getObject().
setObject in class GcsMessageobject - 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 GcsMessageGcsMessage.isReliable()public void setSafe()
GcsMessage
setSafe in class GcsMessageGcsMessage.isSafe()public void setSelfDiscard(boolean selfDiscard)
GcsMessageGcsConnection.multicast(GcsMessage) .
setSelfDiscard in class GcsMessageselfDiscard - determines if the message should self-discard or notGcsMessage.isSelfDiscard()public void setServiceType(int serviceType)
GcsMessageGcsMessage.getServiceType() .
setServiceType in class GcsMessageserviceType - the service type for this messageGcsMessage.getServiceType()public void setType(short type)
GcsMessageGcsMessage.getType() method should be called.
setType in class GcsMessagetype - value which the message should be labeled withGcsMessage.getType()public void setUnreliable()
GcsMessage
setUnreliable in class GcsMessageGcsMessage.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 | ||||||||