Package net.sf.eBus.feed.historic
Class HistoricReply.Builder
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject.Builder<M>
-
- net.sf.eBus.messages.EMessage.Builder<M,B>
-
- net.sf.eBus.messages.EReplyMessage.Builder<HistoricReply,HistoricReply.Builder>
-
- net.sf.eBus.feed.historic.HistoricReply.Builder
-
- Enclosing class:
- HistoricReply
public static final class HistoricReply.Builder extends EReplyMessage.Builder<HistoricReply,HistoricReply.Builder>
Builder class forHistoricReplymessage instances. ABuilderis acquired using theHistoricReply.builder()method. Each builder instance should be used to build only oneHistoricReplyinstance.Builderrequire notification array to be non-nulland non empty.- See Also:
HistoricReply
-
-
Field Summary
-
Fields inherited from class net.sf.eBus.messages.EReplyMessage.Builder
mReplyReason, mReplyStatus
-
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 HistoricReplybuildImpl()Returns a new historic notification reply based onthis Builder's settings.HistoricReply.Buildernotifications(Collection<ENotificationMessage> messages)Sets historic messages returned in this reply.HistoricReply.Buildernotifications(ENotificationMessage[] messages)Sets historic messages returned in this reply.protected net.sf.eBus.util.Validatorvalidate(net.sf.eBus.util.Validator problems)Checks if this builder is correctly configured before building target message instance.-
Methods inherited from class net.sf.eBus.messages.EReplyMessage.Builder
replyReason, replyStatus
-
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
-
validate
protected net.sf.eBus.util.Validator validate(net.sf.eBus.util.Validator problems)
Checks if this builder is correctly configured before building target message instance. A validHistoricReplyrequires that notifications are set to a non-null, non-empty array.- Overrides:
validatein classEReplyMessage.Builder<HistoricReply,HistoricReply.Builder>- Parameters:
problems- place invalid configuration settings into this problems list.- Returns:
problemsis returned to all method chaining.
-
buildImpl
protected HistoricReply buildImpl()
Returns a new historic notification reply based onthis Builder's settings.- Specified by:
buildImplin classEMessageObject.Builder<HistoricReply>- Returns:
- new historic notification reply.
-
notifications
public HistoricReply.Builder notifications(ENotificationMessage[] messages)
Sets historic messages returned in this reply. Messages array may not benullor empty.- Parameters:
messages- reply contains these messages.- Returns:
this Builderinstance.- Throws:
NullPointerException- ifmessagesisnull.IllegalArgumentException- ifmessagesarray is empty.IllegalStateException- if messages array was previously set.
-
notifications
public HistoricReply.Builder notifications(Collection<ENotificationMessage> messages)
Sets historic messages returned in this reply. Messages collection may not benullor empty.- Parameters:
messages- reply contains these messages.- Returns:
this Builderinstance.- Throws:
NullPointerException- ifmessagesisnull.IllegalArgumentException- ifmessagesis empty.IllegalStateException- if messages array was previously set.
-
-