Package net.sf.eBus.feed.pattern
Class MatchEvent
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject
-
- net.sf.eBus.messages.EMessage
-
- net.sf.eBus.messages.ENotificationMessage
-
- net.sf.eBus.feed.pattern.MatchEvent
-
- All Implemented Interfaces:
Serializable
@ELocalOnly public final class MatchEvent extends ENotificationMessage
A match event reports an event pattern match. Contains the capturing group map and the user-defined data cache.- Author:
- Charles W. Rapp
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMatchEvent.BuilderMatchEventnotification builder class.-
Nested classes/interfaces inherited from class net.sf.eBus.messages.EMessage
EMessage.MessageType
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,List<ENotificationMessage>>groupsThe collected events for each pattern group.Map<Object,Object>userCacheThis map contains the user-defined data stored whenMatchConditions were executed.-
Fields inherited from class net.sf.eBus.messages.ENotificationMessage
NO_PUB_ID, position, publisherId
-
Fields inherited from class net.sf.eBus.messages.EMessage
MAX_SUBJECT_LENGTH, subject, timestamp
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MatchEvent.Builderbuilder()Returns a newMatchEventbuilder instance.List<ENotificationMessage>group(String name)Returns the notification list associated with the given group name.StringtoString()Returns a string containing each of the groups and the group event.-
Methods inherited from class net.sf.eBus.messages.ENotificationMessage
equals, hashCode
-
Methods inherited from class net.sf.eBus.messages.EMessage
isApplicationMessage, isSystemMessage, key, messageType, timestampAsInstant
-
-
-
-
Field Detail
-
groups
public final Map<String,List<ENotificationMessage>> groups
The collected events for each pattern group. Pattern groupEventPattern.ALL_EVENTScontains all matched events. The remaining map keys (if any) are from the user-definedEventPattern. The groups map and the notification list values are both read-only.
-
userCache
public final Map<Object,Object> userCache
This map contains the user-defined data stored whenMatchConditions were executed. This map is notnullbut may be empty.
-
-
Method Detail
-
toString
public String toString()
Returns a string containing each of the groups and the group event.- Overrides:
toStringin classENotificationMessage- Returns:
- textual representation of the match event.
-
group
public List<ENotificationMessage> group(String name)
Returns the notification list associated with the given group name. May returnnullif there is not group with the given name.- Parameters:
name- group name.- Returns:
- group event list.
-
builder
public static MatchEvent.Builder builder()
Returns a newMatchEventbuilder instance.- Returns:
MatchEventbuilder instance.
-
-