public static final class DOFServer.Config.BuilderUnsecureMulticast
extends java.lang.Object
DOFServer.Type.DATAGRAM
server configurations.
The security desire is DOF.SecurityDesire.NOT_SECURE
.
These configurations are immutable once built, and so
the builder allows them to be created (and modified) up until they are built.Constructor and Description |
---|
BuilderUnsecureMulticast(DOFAddress listenMcastAddress)
Create a simple, unsecure server on the target address.
|
Modifier and Type | Method and Description |
---|---|
DOFServer.Config |
build()
Build a configuration based on the current state of the builder.
|
DOFServer |
createServer(DOF dof)
This is a convenience method for creating the server with the implied
DOFServer.Config . |
DOFServer |
createServer(DOF dof,
DOFAddress ucastAddress)
This is a convenience method for creating the server with the implied
DOFServer.Config . |
T |
setAddress(DOFAddress listenAddress)
Set this server's listening address.
|
T |
setAuditorListener(DOFAuditListener auditListener)
Set this server's audit listener.
|
T |
setBridge(DOFOperation.Bridge.Config bridge)
Set the bridge of the server.
|
T |
setConnectionLimit(int connectionLimit)
Set the maximum number of inbound connections that the server can support.
|
T |
setMaxReceiveSilence(int maxReceiveSilence)
Set this server's max receive silence.
|
T |
setMaxSendSilence(int maxSendSilence)
Set this server's max send silence.
|
T |
setName(java.lang.String name)
Set this server's name used for logging purposes.
|
T |
setProtocolNegotiator(DOFProtocolNegotiator negotiator)
Set this server's protocol negotiator.
|
T |
setReceiveFilter(DOFOperation.Filter receiveFilter)
Set the receive filter of the server.
|
T |
setSendFilter(DOFOperation.Filter sendFilter)
Set the send filter of the server.
|
T |
setTransportConfig(org.opendof.core.transport.ServerConfig config)
Set this server's transport configuration.
|
DOFServer.Config.BuilderUnsecureMulticast |
setUnicastAddress(DOFAddress ucastAddress)
Set the unicastAddress to be used by
createServer(DOF) . |
public BuilderUnsecureMulticast(DOFAddress listenMcastAddress)
listenMcastAddress
- The listening multicast address of the server. Null is not allowed.public DOFServer.Config.BuilderUnsecureMulticast setUnicastAddress(DOFAddress ucastAddress)
createServer(DOF)
. This is a convenience so that you don't have to keep the address
around until createServer is called. The default is null, so if this method is not called, createServer(DOF) will throw
IllegalArgumentException.
This method signature is only useful if you plan on calling it much later than the constructor and don't want to pass around the ucastAddress
parameter you will need to call createServer(DOF, DOFAddress)
. If that is not your use case, then just call
creates(DOF, DOFAddress).ucastAddress
- The unicastAddress.createServer(DOF)
public DOFServer createServer(DOF dof)
DOFServer.Config
.
This is the server only. This server will not source requests to other nodes. For that, see
DOFConnection.Config.BuilderUnsecureMulticast
.
The unicastAddress must have been set explicitly with setUnicastAddress(org.opendof.core.oal.DOFAddress)
.dof
- The DOF to use to create the server.DOFConnection.Config.BuilderUnsecureMulticast.createConnection(DOF)
,
DOFConnection.Config.BuilderUnsecureMulticast.createPeerConnection(DOF, DOFAddress, DOFAddress)
,
setUnicastAddress(DOFAddress)
public DOFServer createServer(DOF dof, DOFAddress ucastAddress)
DOFServer.Config
.
This is the server only. This server will not source requests to other nodes. For that, see
DOFConnection.Config.BuilderUnsecureMulticast
.dof
- The DOF to use to create the server.ucastAddress
- The server address of the hub. Usually, you will use this: InetTransport.createAddress("0.0.0.0", 0)
DOFConnection.Config.BuilderUnsecureMulticast.createConnection(DOF)
,
DOFConnection.Config.BuilderUnsecureMulticast.createPeerConnection(DOF, DOFAddress, DOFAddress)
public T setAddress(DOFAddress listenAddress)
listenAddress
- The address to set on this server. This must not be null.public T setMaxSendSilence(int maxSendSilence)
maxSendSilence
- The max send silence to set on this server, in milliseconds. Must be greater than 0.public T setConnectionLimit(int connectionLimit)
connectionLimit
- The connection limit. Must be >= 0. Default is DOF.UNLIMITED
.public T setMaxReceiveSilence(int maxReceiveSilence)
maxReceiveSilence
- The max receive silence to set on this server, in milliseconds. Must be greater than 0.public T setProtocolNegotiator(DOFProtocolNegotiator negotiator)
negotiator
- The protocol negotiator to set on this server's configuration.The default is the same as calling this with
DOFProtocolNegotiator.createDefault()
.public T setBridge(DOFOperation.Bridge.Config bridge)
bridge
- The bridge for this server. null
means none (default).public T setSendFilter(DOFOperation.Filter sendFilter)
sendFilter
- The server's send filter. null
means none.public T setReceiveFilter(DOFOperation.Filter receiveFilter)
receiveFilter
- The server's receive filter. null
means none.public T setTransportConfig(org.opendof.core.transport.ServerConfig config)
config
- The transport configuration to set on this server's configuration. null
means none (default).public T setName(java.lang.String name)
name
- The server's name.public T setAuditorListener(DOFAuditListener auditListener)
auditListener
- The server's audit listener. null
means none (default).public DOFServer.Config build()