M - target message class.B - Builder subclass.public abstract static class AbstractEBusMessage.Builder<M extends AbstractEBusMessage,B extends AbstractEBusMessage.Builder<M,?>> extends ENotificationMessage.Builder<M,B>
AbstractEBusMessage
builders.mTargetClass| Modifier | Constructor and Description |
|---|---|
protected |
Builder(Class<? extends EMessageObject> targetClass) |
| Modifier and Type | Method and Description |
|---|---|
B |
remoteAddress(InetSocketAddress address) |
B |
serverPort(int serverPort) |
protected void |
validate(List<String> problems)
Checks if message subject and message type are
configured.
|
subject, timestamp, timestampbuild, buildImplprotected Builder(Class<? extends EMessageObject> targetClass)
protected void validate(List<String> problems)
EMessage.Builderproblems.
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 be
super.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
an if/else if chain. That way all problems
are found and not just the first one.
validate in class EMessage.Builder<M extends AbstractEBusMessage,B extends AbstractEBusMessage.Builder<M,?>>problems - append validation problems to this
list.public final B remoteAddress(InetSocketAddress address)
public final B serverPort(int serverPort)
Copyright © 2019. All rights reserved.