Package net.sf.eBusx.monitor
Class TransientStatusMessage.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<TransientStatusMessage,TransientStatusMessage.Builder>
-
- net.sf.eBusx.monitor.TransientStatusMessage.Builder
-
- Enclosing class:
- TransientStatusMessage
public static final class TransientStatusMessage.Builder extends ENotificationMessage.Builder<TransientStatusMessage,TransientStatusMessage.Builder>
Builder class used to create anTransientStatusMessage
message. A newBuilder
instance is obtained fromTransientStatusMessage.builder()
.
-
-
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 TransientStatusMessage.Builder
actionLevel(ActionLevel level)
TransientStatusMessage.Builder
actionMessage(java.lang.String message)
TransientStatusMessage.Builder
actionName(java.lang.String name)
TransientStatusMessage
buildImpl()
Returns eBus message instance built from the configured properties.TransientStatusMessage.Builder
instance(int id)
Validator
validate(Validator problems)
Checks if message subject and message type are configured.-
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
public TransientStatusMessage buildImpl()
Description copied from class:EMessageObject.Builder
Returns eBus message instance built from the configured properties. Note: the builder configuration wasvalidated
prior to calling this method. The message object may now be constructed.- Specified by:
buildImpl
in classEMessageObject.Builder<TransientStatusMessage>
- Returns:
- target message class instance.
-
validate
public Validator validate(Validator problems)
Description copied from class:EMessage.Builder
Checks if message subject and message type are configured. If not, then text explaining this error is appended toproblems
.This method should be overridden by subclass message builders and called before doing its own validation. The first line in the subclass
validate
implementation should besuper.validate(problems);
.When overriding this method, be sure to add all discovered validation problems to the list. The validation method should consist of a series of individual
if
statements and not anif/else if
chain. That way all problems are found and not just the first one.Please see
Validator
for a validationBuilder
settings example.- Overrides:
validate
in classEMessage.Builder<TransientStatusMessage,TransientStatusMessage.Builder>
- Parameters:
problems
- used to check field validity and collect discovered invalid fields.- Returns:
problems
to allow for method chaining.- See Also:
Validator
-
instance
public TransientStatusMessage.Builder instance(int id)
-
actionLevel
public TransientStatusMessage.Builder actionLevel(ActionLevel level)
-
actionName
public TransientStatusMessage.Builder actionName(java.lang.String name)
-
actionMessage
public TransientStatusMessage.Builder actionMessage(java.lang.String message)
-
-