Class TopicForwardNot
- java.lang.Object
-
- fr.dyade.aaa.agent.Notification
-
- fr.dyade.aaa.agent.CallbackNotification
-
- org.objectweb.joram.mom.notifications.TopicForwardNot
-
- All Implemented Interfaces:
Encodable,Serializable,Cloneable
public final class TopicForwardNot extends CallbackNotification
ATopicForwardNotis a notification sent by a topic to another topic part of the same cluster, or to its hierarchical father, and holding a forwardedClientMessagesnotification.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTopicForwardNot.Factory
-
Field Summary
Fields Modifier and Type Field Description private booleanfromClustertrueif the notification is destinated to a hierarchical father.private ClientMessagesmessagesThe forwarded messages.private static longserialVersionUID-
Fields inherited from class fr.dyade.aaa.agent.Notification
detachable, detached, persistent
-
Fields inherited from interface fr.dyade.aaa.common.encoding.Encodable
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
-
-
Constructor Summary
Constructors Constructor Description TopicForwardNot()TopicForwardNot(ClientMessages messages, boolean fromCluster)Constructs aTopicForwardNotinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(Decoder decoder)Decodes the object.voidencode(Encoder encoder)Encodes the object.intgetEncodableClassId()The class id is still not defined.intgetEncodedSize()Returns the size of the encoded object.ClientMessagesgetMessages()booleanisFromCluster()voidsetPersistent(boolean persistent)StringBuildertoString(StringBuilder output)Appends a string image for this object to the StringBuffer parameter.-
Methods inherited from class fr.dyade.aaa.agent.CallbackNotification
done, failed, hasCallback, passCallback, setCountDownCallback
-
Methods inherited from class fr.dyade.aaa.agent.Notification
clone, getContext, getDeadNotificationAgentId, getExpiration, getMessageId, getPriority, isPersistent, setContext, setDeadNotificationAgentId, setExpiration, setPriority, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
fromCluster
private boolean fromCluster
trueif the notification is destinated to a hierarchical father.
-
messages
private ClientMessages messages
The forwarded messages.
-
-
Constructor Detail
-
TopicForwardNot
public TopicForwardNot()
-
TopicForwardNot
public TopicForwardNot(ClientMessages messages, boolean fromCluster)
Constructs aTopicForwardNotinstance.- Parameters:
messages- Notification to forward.fromCluster-trueif the notification is coming from a cluster friend.
-
-
Method Detail
-
isFromCluster
public boolean isFromCluster()
- Returns:
- the fromCluster
-
getMessages
public ClientMessages getMessages()
- Returns:
- the messages
-
setPersistent
public void setPersistent(boolean persistent)
-
getEncodableClassId
public int getEncodableClassId()
Description copied from class:NotificationThe class id is still not defined.- Specified by:
getEncodableClassIdin interfaceEncodable- Overrides:
getEncodableClassIdin classNotification- Returns:
- a unique class identifier
-
getEncodedSize
public int getEncodedSize() throws ExceptionDescription copied from class:NotificationReturns the size of the encoded object.- Specified by:
getEncodedSizein interfaceEncodable- Overrides:
getEncodedSizein classNotification- Returns:
- the size of the encoded object
- Throws:
Exception- if an error occurs
-
encode
public void encode(Encoder encoder) throws Exception
Description copied from class:NotificationEncodes the object.- Specified by:
encodein interfaceEncodable- Overrides:
encodein classNotification- Parameters:
encoder- the encoder- Throws:
Exception- if an error occurs
-
decode
public void decode(Decoder decoder) throws Exception
Description copied from class:NotificationDecodes the object.- Specified by:
decodein interfaceEncodable- Overrides:
decodein classNotification- Parameters:
decoder- the encoder- Throws:
Exception- if an error occurs
-
toString
public StringBuilder toString(StringBuilder output)
Description copied from class:NotificationAppends a string image for this object to the StringBuffer parameter.- Overrides:
toStringin classNotification- Parameters:
output- buffer to fill in.- Returns:
- the resulting buffer.
-
-