public class Event extends Object
Event
objects are delivered to EventHandler
services which subscribe to the topic of the event.Constructor and Description |
---|
Event(String topic,
Dictionary properties)
Constructs an event.
|
Event(String topic,
Map properties)
Constructs an event.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Compares this
Event object to another object. |
Object |
getProperty(String name)
Retrieves a property.
|
String[] |
getPropertyNames()
Returns a list of this event's property names.
|
String |
getTopic()
Returns the topic of this event.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
matches(Filter filter)
Tests this event's properties against the given filter using a case
sensitive match.
|
String |
toString()
Returns the string representation of this event.
|
public Event(String topic, Map properties)
topic
- The topic of the event.properties
- The event's properties (may be null
). A
property whose key is not of type String
will be
ignored.IllegalArgumentException
- If topic is not a valid topic name.public Event(String topic, Dictionary properties)
topic
- The topic of the event.properties
- The event's properties (may be null
). A
property whose key is not of type String
will be
ignored.IllegalArgumentException
- If topic is not a valid topic name.public final Object getProperty(String name)
name
- the name of the property to retrievenull
if not found.public final String[] getPropertyNames()
public final String getTopic()
public final boolean matches(Filter filter)
filter
- The filter to test.public boolean equals(Object object)
Event
object to another object.
An event is considered to be equal to another event if the topic
is equal and the properties are equal. The properties are compared using
the java.util.Map.equals()
rules which includes identity
comparison for array values.
public int hashCode()
Copyright © 2018 JBoss by Red Hat. All rights reserved.