class EventID extends Object implements Serializable
EventID
class is used to represent a unique event
registration. This class maintains the two pieces of information
that make a registration unique: the event's source and ID attributes.
It's used by the mailbox code in order to maintain a list
of EventIDs that caused an UnknownEventException
to be received during an event notification attempt for a given event.Modifier and Type | Field and Description |
---|---|
private long |
id
The event ID.
|
private static long |
serialVersionUID |
private Object |
source
The event source
|
Constructor and Description |
---|
EventID(Object source,
long id)
Simple constructor that assigns the provided arguments
to the appropriate internal fields
|
EventID(RemoteEvent evt)
Convenience constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Return true if the given object is equal to
this object
and false otherwise. |
int |
hashCode() |
private void |
init(Object source,
long id)
Convenience initialization method.
|
private void |
readObject(ObjectInputStream stream)
Initialize
id field using default semantics but
then unmarshal the value of source from the stream. |
String |
toString() |
private void |
writeObject(ObjectOutputStream stream) |
private static final long serialVersionUID
private transient Object source
private long id
public EventID(Object source, long id)
public EventID(RemoteEvent evt)
RemoteEvent
argument.IllegalArgumentException
- if a null argument is providedprivate void init(Object source, long id)
IllegalArgumentException
- if a null source argument is provided.public boolean equals(Object o)
this
object
and false otherwise. Two EventID
objects are considered
equal if their source and ID attributes are equal.private void writeObject(ObjectOutputStream stream) throws IOException
IOException
- if an I/O error occursprivate void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
id
field using default semantics but
then unmarshal the value of source
from the stream.IOException
- if an I/O error occursClassNotFoundException
- if a class of a serialized object
cannot be foundCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.