Package org.jini.rio.event
Class EventDescriptor
java.lang.Object
net.jini.entry.AbstractEntry
org.jini.rio.event.EventDescriptor
- All Implemented Interfaces:
Serializable,Entry
The EventDescriptor describes an event that an EventProducer will advertise as part of it's
attribute set in a Jini Lookup Service.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe event classes Class that this EventDescriptor describesThe event class event identifier. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct an EventDescriptor with attributes set to nullEventDescriptor(long eventID) Construct an EventDescriptor with a long event ID.EventDescriptor(Class eventClass) Construct an EventDescriptor with a classEventDescriptor(Class eventClass, long eventID) Construct an EventDescriptor with a class and long event ID.EventDescriptor(Class eventClass, Long eventID) Construct an EventDescriptor with a class and an event ID.EventDescriptor(Long eventID) Construct an EventDescriptor with a Long event ID. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(EventDescriptor template) Determine whether the provided EventDescriptor matches properties of this EventDescriptortoString()Produce a String representation of an EventDescriptor
-
Field Details
-
eventClass
The event classes Class that this EventDescriptor describes -
eventID
The event class event identifier. Care should be taken that this identifier is unique
-
-
Constructor Details
-
EventDescriptor
public EventDescriptor()Construct an EventDescriptor with attributes set to null -
EventDescriptor
Construct an EventDescriptor with a class -
EventDescriptor
public EventDescriptor(long eventID) Construct an EventDescriptor with a long event ID. -
EventDescriptor
Construct an EventDescriptor with a Long event ID. -
EventDescriptor
Construct an EventDescriptor with a class and long event ID. The eventID will be turned into a Long -
EventDescriptor
Construct an EventDescriptor with a class and an event ID.
-
-
Method Details
-
matches
Determine whether the provided EventDescriptor matches properties of this EventDescriptor- Returns:
- The following logic determines EventDescriptor matching semantics :
- If the
provided EventDescriptor properties
eventIDandeventClassarenull, returntrue. - If the provided EventDescriptor property
eventIDisnull, and theeventClassproperty is notnull, return whether the provided EventDescriptor propertyeventClassis equal to theeventClassproperty - If the
eventIDproperty isnull, returnfalse. - If the
eventIDproperty is notnull, and the provided EventDescriptoreventIDproperty is notnull, return whether the provided EventDescriptor propertyeventIDis equal to theeventIDproperty
- If the
provided EventDescriptor properties
- Throws:
NullPointerException- if the the provided EventDescriptor isnull
-
toString
Produce a String representation of an EventDescriptor- Overrides:
toStringin classAbstractEntry- Returns:
- the result of calling
AbstractEntry.toString(this)
-