Package net.sf.eBusx.monitor
Class MonitorUpdate.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<MonitorUpdate,MonitorUpdate.Builder>
 - 
- net.sf.eBusx.monitor.MonitorUpdate.Builder
 
 
 
 
 
- 
- Enclosing class:
 - MonitorUpdate
 
public static final class MonitorUpdate.Builder extends ENotificationMessage.Builder<MonitorUpdate,MonitorUpdate.Builder>
Builder for creatingMonitorUpdatenotification. 
- 
- 
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 MonitorUpdate.BuilderactionLevel(ActionLevel level)MonitorUpdate.BuilderactionMessage(java.lang.String message)MonitorUpdate.BuilderactionName(java.lang.String actionName)MonitorUpdate.BuilderappName(java.lang.String name)Sets application name to given value.protected MonitorUpdatebuildImpl()Returns eBus message instance built from the configured properties.MonitorUpdate.BuilderhostName(java.lang.String name)Sets host name to given value.MonitorUpdate.Builderinstance(MonitorId id)MonitorUpdate.BuilderupdateType(MonitorUpdate.UpdateType type)protected Validatorvalidate(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
protected MonitorUpdate buildImpl()
Description copied from class:EMessageObject.BuilderReturns eBus message instance built from the configured properties. Note: the builder configuration wasvalidatedprior to calling this method. The message object may now be constructed.- Specified by:
 buildImplin classEMessageObject.Builder<MonitorUpdate>- Returns:
 - target message class instance.
 
 
- 
validate
protected Validator validate(Validator problems)
Description copied from class:EMessage.BuilderChecks 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
validateimplementation 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
ifstatements and not anif/else ifchain. That way all problems are found and not just the first one.Please see
Validatorfor a validationBuildersettings example.- Overrides:
 validatein classEMessage.Builder<MonitorUpdate,MonitorUpdate.Builder>- Parameters:
 problems- used to check field validity and collect discovered invalid fields.- Returns:
 problemsto allow for method chaining.- See Also:
 Validator
 
- 
hostName
public MonitorUpdate.Builder hostName(java.lang.String name)
Sets host name to given value. This name does not need to be a network host name but any name meaningful to the application and those monitoring it.- Parameters:
 name- host name.- Returns:
 this Builderinstance.- Throws:
 java.lang.IllegalArgumentException- ifnameis eithernullor empty.
 
- 
appName
public MonitorUpdate.Builder appName(java.lang.String name)
Sets application name to given value.- Parameters:
 name- application name.- Returns:
 this Builderinstance.- Throws:
 java.lang.IllegalArgumentException- ifnameis eithernullor empty.
 
- 
instance
public MonitorUpdate.Builder instance(MonitorId id)
 
- 
updateType
public MonitorUpdate.Builder updateType(MonitorUpdate.UpdateType type)
 
- 
actionLevel
public MonitorUpdate.Builder actionLevel(ActionLevel level)
 
- 
actionName
public MonitorUpdate.Builder actionName(java.lang.String actionName)
 
- 
actionMessage
public MonitorUpdate.Builder actionMessage(@Nullable java.lang.String message)
 
 - 
 
 -