fr.dyade.aaa.agent
Class Notification

java.lang.Object
  extended by fr.dyade.aaa.agent.Notification
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AbstractNotification, AcquisitionNot, AdminNotification, AgentCreateReply, AgentCreateRequest, AgentDeleteRequest, CloseConnectionNot, ClusterAck, ClusterNot, ClusterTest, DeleteAck, DeleteNot, ExceptionNotification, ExpiredNot, FlowControlNot, FwdAdminRequestNot, InitJndiServerNot, JMSBridgeAckNot, JMSBridgeDeliveryNot, JndiReplyNot, JndiScriptReplyNot, JndiScriptRequestNot, JndiUpdateNot, ProxyRequestGroupNot, QueueClusterNot, RequestNot, ResetCollocatedConnectionsNot, ReturnConnectionNot, SchedulerQueueNot, SendRepliesNot, SendReplyNot, SyncNotification, SyncReply, SyncReplyNot, SyncRequestNot, TcpRequestNot, TopicForwardNot, UnknownAgent, UnknownNotification, WakeUpNot

public class Notification
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Class Notification is the root of the notifications hierarchy. Every notification's class has Notification as a superclass.

See Also:
Serialized Form

Field Summary
private  java.lang.Object context
          Context of the notification.
(package private)  AgentId deadNotificationAgentId
          The agentId identifying the agent to which the notification is sent when it is expired.
protected  boolean detachable
          True if the notification is detachable, false otherwise.
protected  boolean detached
          True if the notification is detached, false otherwise.
(package private)  long expiration
          The expiration date for this notification.
(package private)  java.lang.String messageId
          If the notification is stored independently that its containing message messageId contains the persistent name of this notification.
protected  boolean persistent
          True if the notification is persistent, false otherwise.
(package private)  byte priority
          The priority for this notification from 0 to 9, 9 being the highest.
(package private) static long serialVersionUID
          define serialVersionUID for interoperability
 
Constructor Summary
Notification()
           
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this notification.
 java.lang.Object getContext()
          Returns the context of the notification.
 AgentId getDeadNotificationAgentId()
           
 long getExpiration()
          Gets the notification's expiration value.
 java.lang.String getMessageId()
           
 int getPriority()
          Gets the notification's priority value.
 boolean isPersistent()
          Return true if notification is persistent.
 void setContext(java.lang.Object context)
          Sets the context of the notification.
 void setDeadNotificationAgentId(AgentId deadNotificationAgentId)
          Sets the forwardExpiredNotAgentId value which enable sending expired notifications to a specific agent
 void setExpiration(long expiration)
          Sets the expiration date for this notification.
 void setPriority(int priority)
          Sets the priority for this notification.
 java.lang.String toString()
          Provides a string image for this object.
 java.lang.StringBuffer toString(java.lang.StringBuffer output)
          Appends a string image for this object to the StringBuffer parameter.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
define serialVersionUID for interoperability

See Also:
Constant Field Values

persistent

protected transient boolean persistent
True if the notification is persistent, false otherwise. By default, this field is set to true during object creation and disk loading. This field is carry by network protocol. There is no public setter for this attribute. According the fact that a notification class is or not persistent this attribute should be statically fixed in the subclass constructor.


detachable

protected transient boolean detachable
True if the notification is detachable, false otherwise. A detachable notification is saved in a different object that its containing message.


detached

protected transient boolean detached
True if the notification is detached, false otherwise. A detached notification is not destroyed in the same way that its containing message.


expiration

long expiration
The expiration date for this notification. This field is handled by the network protocol in order to fit the time synchronization problem.


priority

byte priority
The priority for this notification from 0 to 9, 9 being the highest. By default, the priority is 4


deadNotificationAgentId

AgentId deadNotificationAgentId
The agentId identifying the agent to which the notification is sent when it is expired.
Default value is null, which means the expired notification is lost.


messageId

transient java.lang.String messageId
If the notification is stored independently that its containing message messageId contains the persistent name of this notification.


context

private java.lang.Object context
Context of the notification.

Constructor Detail

Notification

public Notification()
Method Detail

setExpiration

public void setExpiration(long expiration)
Sets the expiration date for this notification. A value of 0L (default) indicates that the notification does not expire.

Parameters:
expiration - the expiration date for this notification.

getExpiration

public long getExpiration()
Gets the notification's expiration value. This field is handled by the network protocol in order to fit the time synchronization problem. If the expiration date is set to 0L (default), it indicates that the notification does not expire. When a notification's expiration time is reached, the MOM should discard it without any form of notification of message expiration. Agents should not receive messages that have expired; however, the MOM does not guarantee that this will not happen.

Returns:
The notification's expiration value.

setPriority

public void setPriority(int priority)
Sets the priority for this notification. A value between 0 (lowest) and 9 (highest), by default 4 (normal).

Parameters:
priority - the priority for this notification.

getPriority

public int getPriority()
Gets the notification's priority value.

Returns:
The notification's priority value.

getMessageId

public java.lang.String getMessageId()

setContext

public final void setContext(java.lang.Object context)
Sets the context of the notification.

Parameters:
context - the context of the notification.

getContext

public final java.lang.Object getContext()
Returns the context of the notification.

Returns:
the context of the notification.

clone

public java.lang.Object clone()
Returns a clone of this notification.

Overrides:
clone in class java.lang.Object
Returns:
a clone of this notification.

isPersistent

public boolean isPersistent()
Return true if notification is persistent.

Returns:
persistent of this notification.

getDeadNotificationAgentId

public AgentId getDeadNotificationAgentId()
Returns:
The agentId identifying the agent to which the notification is sent when it is expired.

setDeadNotificationAgentId

public void setDeadNotificationAgentId(AgentId deadNotificationAgentId)
Sets the forwardExpiredNotAgentId value which enable sending expired notifications to a specific agent

Parameters:
deadNotificationAgentId - the AgentId to which the dead notification is forwarded

toString

public java.lang.StringBuffer toString(java.lang.StringBuffer output)
Appends a string image for this object to the StringBuffer parameter.

Parameters:
output - buffer to fill in
Returns:
output buffer is returned

toString

public final java.lang.String toString()
Provides a string image for this object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation for this object.


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.