public static class Server.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
Server |
build() |
Server.Builder |
setBacklog(int backlog)
Sets the backlog that is passed to the java.net.ServerSocket.
|
Server.Builder |
setBindAddr(java.net.InetAddress bindAddr)
Sets the IP address to bind to.
|
T |
setCommonAddressFieldLength(int length)
Sets the length of the Common Address (CA) field of the ASDU.
|
T |
setCotFieldLength(int length)
Sets the length of the Cause Of Transmission (COT) field of the ASDU.
|
T |
setIoaFieldLength(int length)
Sets the length of the Information Object Address (IOA) field of the ASDU.
|
Server.Builder |
setMaxConnections(int maxConnections)
Set the maximum number of client connections that are allowed in parallel.
|
T |
setMaxIdleTime(int time)
Sets the maximum time in ms that the connection may be idle before sending a test frame.
|
T |
setMaxTimeNoAckReceived(int time)
Sets the maximum time in ms that no acknowledgement has been received (for I-Frames or Test-Frames) before
actively closing the connection.
|
T |
setMaxTimeNoAckSent(int time)
Sets the maximum time in ms before confirming received messages that have not yet been acknowledged using an S
format APDU.
|
T |
setMaxUnconfirmedIPdusReceived(int maxNum)
Sets the number of unacknowledged I format APDUs received before the connection will automatically send an S
format APDU to confirm them.
|
Server.Builder |
setPort(int port)
Sets the TCP port that the server will listen on.
|
Server.Builder |
setSocketFactory(javax.net.ServerSocketFactory socketFactory)
Sets the ServerSocketFactory to be used to create the ServerSocket.
|
public Server.Builder setPort(int port)
port
- the portpublic Server.Builder setBacklog(int backlog)
backlog
- the backlogpublic Server.Builder setBindAddr(java.net.InetAddress bindAddr)
bindAddr
- the IP address to bind topublic Server.Builder setSocketFactory(javax.net.ServerSocketFactory socketFactory)
socketFactory
- the ServerSocketFactory to be used to create the ServerSocketpublic Server.Builder setMaxConnections(int maxConnections)
maxConnections
- the number of connections allowed (default is 100) @ return this builderpublic Server build()
public T setCotFieldLength(int length)
length
- the length of the Cause Of Transmission fieldpublic T setCommonAddressFieldLength(int length)
length
- the length of the Common Address (CA) fieldpublic T setIoaFieldLength(int length)
length
- the length of the Information Object Address fieldpublic T setMaxTimeNoAckReceived(int time)
time
- the maximum time in ms that no acknowledgement has been received before actively closing the
connection.public T setMaxTimeNoAckSent(int time)
time
- the maximum time in ms before confirming received messages that have not yet been acknowledged using
an S format APDU.public T setMaxIdleTime(int time)
time
- the maximum time in ms that the connection may be idle before sending a test frame.public T setMaxUnconfirmedIPdusReceived(int maxNum)
maxNum
- the number of unacknowledged I format APDUs received before the connection will automatically send an
S format APDU to confirm them.