public class Notification extends Object implements Serializable, Cloneable, Encodable
Modifier and Type | Field and Description |
---|---|
private Object |
context
Context of the notification.
|
private static byte |
ContextSet |
(package private) AgentId |
deadNotificationAgentId
The agentId identifying the agent to which the notification is sent when it
is expired.
|
private static byte |
DeadNotificationAgentIdSet |
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.
|
private static byte |
ExpirationSet |
(package private) 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) int |
priority
The priority for this notification from 0 to 9, 9 being the highest.
|
(package private) static long |
serialVersionUID
define serialVersionUID for interoperability
|
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
Constructor and Description |
---|
Notification() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a clone of this notification.
|
void |
decode(Decoder decoder)
Decodes the object.
|
void |
encode(Encoder encoder)
Encodes the object.
|
Object |
getContext()
Returns the context of the notification.
|
AgentId |
getDeadNotificationAgentId() |
int |
getEncodableClassId()
The class id is still not defined.
|
int |
getEncodedSize()
Returns the size of the encoded object.
|
long |
getExpiration()
Gets the notification's expiration value.
|
String |
getMessageId() |
int |
getPriority()
Gets the notification's priority value.
|
boolean |
isPersistent()
Return true if notification is persistent.
|
private void |
readObject(ObjectInputStream in)
The readObject method is responsible for reading from the stream and
restoring the classes fields.
|
void |
setContext(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.
|
String |
toString()
Provides a string image for this object.
|
StringBuffer |
toString(StringBuffer output)
Appends a string image for this object to the StringBuffer parameter.
|
private void |
writeObject(ObjectOutputStream out)
The writeObject method is responsible for writing the state of the
object for its particular class so that the corresponding readObject
method can restore it.
|
static final long serialVersionUID
protected transient boolean persistent
protected transient boolean detachable
protected transient boolean detached
long expiration
int priority
AgentId deadNotificationAgentId
transient String messageId
private Object context
private static final byte ExpirationSet
private static final byte ContextSet
private static final byte DeadNotificationAgentIdSet
public void setExpiration(long expiration)
expiration
- the expiration date for this notification.public long getExpiration()
public void setPriority(int priority)
priority
- the priority for this notification.public int getPriority()
public String getMessageId()
public final void setContext(Object context)
context
- the context of the notification.public final Object getContext()
public Object clone()
public boolean isPersistent()
public AgentId getDeadNotificationAgentId()
public void setDeadNotificationAgentId(AgentId deadNotificationAgentId)
deadNotificationAgentId
- the AgentId to which the dead notification is forwardedprivate void writeObject(ObjectOutputStream out) throws IOException
out
- IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
in
- IOException
ClassNotFoundException
public StringBuffer toString(StringBuffer output)
output
- buffer to fill inoutput
buffer is returnedpublic final String toString()
public int getEncodableClassId()
getEncodableClassId
in interface Encodable
public int getEncodedSize() throws Exception
getEncodedSize
in interface Encodable
if
- an error occursException
- if an error occursCopyright © 2016 ScalAgent D.T.. All Rights Reserved.