public class NoneSecurityServerFactory extends java.lang.Object implements IServerSecurityFactory
Constructor and Description |
---|
NoneSecurityServerFactory()
Constructs the factory that creates a normal server socket with default values.
|
Modifier and Type | Method and Description |
---|---|
java.net.ServerSocket |
createServerSocket(java.net.InetSocketAddress socketAddress)
Creates non-secured server socket.
|
int |
getMaxAmountOfConnections()
Gets the maximum amount of connections the TCP listener can handle.
|
int |
getReceiveBufferSize()
Returns the size of the receiving buffer in bytes.
|
int |
getReceiveTimeout()
Returns timeout setup for receiving a message.
|
boolean |
getReuseAddress()
Gets the flag indicating whether the socket can be bound to the address which is already in use.
|
int |
getSendBufferSize()
Returns the size of the sending buffer in bytes.
|
int |
getSendTimeout()
Returns timeout setup for sending a response message.
|
void |
setMaxAmountOfConnections(int maxAmountOfConnections)
Sets the maximum amount of connections the TCP listener can handle.
|
void |
setReceiveBufferSize(int size)
Sets the size of receiving buffer in bytes.
|
void |
setReceiveTimeout(int receiveTimeout)
Sets timeout for receiving a message.
|
void |
setReuseAddress(boolean allowReuseAddress)
Sets the flag indicating whether the socket can be bound to the address which is already in use.
|
void |
setSendBufferSize(int size)
Sets the size of sending buffer in bytes.
|
void |
setSendTimeout(int sendTimeout)
Sets timeout for sending a response message.
|
public NoneSecurityServerFactory()
public java.net.ServerSocket createServerSocket(java.net.InetSocketAddress socketAddress) throws java.lang.Exception
createServerSocket
in interface IServerSecurityFactory
socketAddress
- addressjava.lang.Exception
public void setSendTimeout(int sendTimeout)
IServerSecurityFactory
setSendTimeout
in interface IServerSecurityFactory
public int getSendTimeout()
IServerSecurityFactory
getSendTimeout
in interface IServerSecurityFactory
public void setReceiveTimeout(int receiveTimeout)
IServerSecurityFactory
setReceiveTimeout
in interface IServerSecurityFactory
public int getReceiveTimeout()
IServerSecurityFactory
getReceiveTimeout
in interface IServerSecurityFactory
public void setSendBufferSize(int size)
IServerSecurityFactory
setSendBufferSize
in interface IServerSecurityFactory
size
- size of the buffer in bytes. (use 8192 by default)public int getSendBufferSize()
IServerSecurityFactory
getSendBufferSize
in interface IServerSecurityFactory
public void setReceiveBufferSize(int size)
IServerSecurityFactory
setReceiveBufferSize
in interface IServerSecurityFactory
size
- size of the buffer in bytes. (use 8192 by default)public int getReceiveBufferSize()
IServerSecurityFactory
getReceiveBufferSize
in interface IServerSecurityFactory
public void setReuseAddress(boolean allowReuseAddress)
IServerSecurityFactory
setReuseAddress
in interface IServerSecurityFactory
allowReuseAddress
- true if the socket can be bound to the address which is already in use.public boolean getReuseAddress()
IServerSecurityFactory
getReuseAddress
in interface IServerSecurityFactory
public int getMaxAmountOfConnections()
IServerSecurityFactory
getMaxAmountOfConnections
in interface IServerSecurityFactory
public void setMaxAmountOfConnections(int maxAmountOfConnections)
IServerSecurityFactory
setMaxAmountOfConnections
in interface IServerSecurityFactory