public static final class DOFServer.Config.BuilderUnsecureStream
extends java.lang.Object
DOFServer.Type.STREAM
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 |
---|
BuilderUnsecureStream(DOFAddress listenAddress)
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 . |
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.
|
public BuilderUnsecureStream(DOFAddress listenAddress)
listenAddress
- The listening address of the server. Null is not allowed.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()
public DOFServer createServer(DOF dof)
DOFServer.Config
.dof
- The DOF to use to create the server.