Package net.sf.eBus.feed.pattern
Class MatchEvent.Builder
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject.Builder<M>
-
- net.sf.eBus.messages.EMessage.Builder<M,B>
-
- net.sf.eBus.messages.ENotificationMessage.Builder<MatchEvent,MatchEvent.Builder>
-
- net.sf.eBus.feed.pattern.MatchEvent.Builder
-
- Enclosing class:
- MatchEvent
public static final class MatchEvent.Builder extends ENotificationMessage.Builder<MatchEvent,MatchEvent.Builder>
MatchEventnotification builder class.
-
-
Field Summary
-
Fields inherited from class net.sf.eBus.messages.ENotificationMessage.Builder
mPosition, mPubId
-
Fields inherited from class net.sf.eBus.messages.EMessageObject.Builder
mTargetClass
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MatchEventbuildImpl()Returns a newMatchEventinstance based on this builder's configuration.MatchEvent.Buildergroups(Map<String,List<ENotificationMessage>> groups)Sets the message collection map to the given value.MatchEvent.BuilderuserCache(Map<Object,Object> userCache)Sets the user cache to the given value.protected net.sf.eBus.util.Validatorvalidate(net.sf.eBus.util.Validator problems)Checks if this builder is correctly configured before attempting to build the target message instance.-
Methods inherited from class net.sf.eBus.messages.ENotificationMessage.Builder
position, publisherId
-
Methods inherited from class net.sf.eBus.messages.EMessage.Builder
copy, subject, timestamp, timestamp
-
Methods inherited from class net.sf.eBus.messages.EMessageObject.Builder
build
-
-
-
-
Method Detail
-
buildImpl
protected MatchEvent buildImpl()
Returns a newMatchEventinstance based on this builder's configuration.- Specified by:
buildImplin classEMessageObject.Builder<MatchEvent>- Returns:
MatchEventinstance.
-
validate
protected net.sf.eBus.util.Validator validate(net.sf.eBus.util.Validator problems)
Checks if this builder is correctly configured before attempting to build the target message instance. A validMatchEventrequires that both the message groups and user cache be set.- Overrides:
validatein classEMessage.Builder<MatchEvent,MatchEvent.Builder>- Parameters:
problems- place invalid fields into this list.- Returns:
problemsis returned to all method chaining.
-
groups
public MatchEvent.Builder groups(Map<String,List<ENotificationMessage>> groups)
Sets the message collection map to the given value.- Parameters:
groups- message collection map. May be empty but notnull.- Returns:
this Builderinstance.- Throws:
NullPointerException- ifgroupsisnull.
-
userCache
public MatchEvent.Builder userCache(Map<Object,Object> userCache)
Sets the user cache to the given value.- Parameters:
userCache- user cache map. May not benullbut may be empty.- Returns:
this Builderinstance.- Throws:
NullPointerException- ifuserCacheisnull.
-
-