Package fr.dyade.aaa.agent
Class CallbackNotification
- java.lang.Object
-
- fr.dyade.aaa.agent.Notification
-
- fr.dyade.aaa.agent.CallbackNotification
-
- All Implemented Interfaces:
Encodable,Serializable,Cloneable
- Direct Known Subclasses:
AbstractNotification,RequestNot,TopicForwardNot
public class CallbackNotification extends Notification
Notification locally transmitting aCountDownCallback. TheCountDownCallbackis not persistent and is not transmitted to a remote destination. If sent to a remote destination, theCountDownCallbackshould be decremented either after the notification has been successfully transmitted, or if a transmission error has been raised. ACountDownCallbackcan be transmitted in severalCallbackNotificationinstances. In that case it is incremented and decremented once for everyCallbackNotification.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private CountDownCallbackcountDownCallbackprivate static longserialVersionUIDdefine serialVersionUID for interoperability, fix with 5.15.0 value-
Fields inherited from class fr.dyade.aaa.agent.Notification
deadNotificationAgentId, detachable, detached, expiration, messageId, persistent, priority
-
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 Modifier Constructor Description CallbackNotification()protectedCallbackNotification(boolean persistent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddone()Called if thisCallbackNotificationis successfully processed.voidfailed(Throwable error)Called if thisCallbackNotificationraises an error.booleanhasCallback()Returnstrueif aCountDownCallbackis transmitted,falseotherwise.voidpassCallback(CallbackNotification not)Passes theCountDownCallbackto the specifiedCallbackNotification.voidsetCountDownCallback(CountDownCallback countDownCallback)Sets theCountDownCallbackto be transmitted by thisCallbackNotification.-
Methods inherited from class fr.dyade.aaa.agent.Notification
clone, decode, encode, getContext, getDeadNotificationAgentId, getEncodableClassId, getEncodedSize, getExpiration, getMessageId, getPriority, isPersistent, setContext, setDeadNotificationAgentId, setExpiration, setPriority, toString, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability, fix with 5.15.0 value- See Also:
- Constant Field Values
-
countDownCallback
private transient CountDownCallback countDownCallback
-
-
Method Detail
-
hasCallback
public boolean hasCallback()
Returnstrueif aCountDownCallbackis transmitted,falseotherwise.- Returns:
trueif aCountDownCallbackis transmitted,falseotherwise
-
passCallback
public void passCallback(CallbackNotification not)
Passes theCountDownCallbackto the specifiedCallbackNotification.- Parameters:
not- theCallbackNotificationto be assigned with theCountDownCallbackowned by thisCallbackNotification
-
setCountDownCallback
public void setCountDownCallback(CountDownCallback countDownCallback)
Sets theCountDownCallbackto be transmitted by thisCallbackNotification.- Parameters:
countDownCallback- theCountDownCallbackto transmit
-
done
public void done()
Called if thisCallbackNotificationis successfully processed.
-
failed
public void failed(Throwable error)
Called if thisCallbackNotificationraises an error.- Parameters:
error- the error that has been raised
-
-