Package net.sf.eBusx.monitor
Class MonitorId.Builder
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject.Builder<M>
-
- net.sf.eBus.messages.EField.Builder<MonitorId>
-
- net.sf.eBusx.monitor.MonitorId.Builder
-
- Enclosing class:
- MonitorId
public static final class MonitorId.Builder extends EField.Builder<MonitorId>
Builder class used to create anMonitorId
field. A newBuilder
instance is obtained fromMonitorId.builder()
.
-
-
Field Summary
-
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 MonitorId
buildImpl()
Returns eBus message instance built from the configured properties.MonitorId.Builder
id(int id)
MonitorId.Builder
instanceName(java.lang.String name)
MonitorId.Builder
typeName(java.lang.String name)
protected Validator
validate(Validator problems)
This method should be overridden by subclass message builders and called before doing its own validation.-
Methods inherited from class net.sf.eBus.messages.EMessageObject.Builder
build
-
-
-
-
Method Detail
-
buildImpl
protected MonitorId 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<MonitorId>
- Returns:
- target message class instance.
-
validate
protected Validator validate(Validator problems)
Description copied from class:EField.Builder
This method should be overridden by subclass message builders and called before doing its own validation. The first line in the subclassvalidate
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 an example of how to validateBuilder
settings.- Overrides:
validate
in classEField.Builder<MonitorId>
- Parameters:
problems
- used to check field validity and collect discovered invalid fields.- Returns:
problems
to allow for method chaining.- See Also:
Validator
-
typeName
public MonitorId.Builder typeName(java.lang.String name)
-
instanceName
public MonitorId.Builder instanceName(java.lang.String name)
-
id
public MonitorId.Builder id(int id)
-
-