eneter.messaging.messagingsystems.tcpmessagingsystem
Class NoneSecurityServerFactory

java.lang.Object
  extended by eneter.messaging.messagingsystems.tcpmessagingsystem.NoneSecurityServerFactory
All Implemented Interfaces:
IServerSecurityFactory

public class NoneSecurityServerFactory
extends java.lang.Object
implements IServerSecurityFactory

Creates the server socket which does not use any security.


Constructor Summary
NoneSecurityServerFactory()
          Constructs the factory that creates a normal server socket with default values.
 
Method Summary
 java.net.ServerSocket createServerSocket(java.net.InetSocketAddress socketAddress)
          Creates non-secured server socket.
 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 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoneSecurityServerFactory

public NoneSecurityServerFactory()
Constructs the factory that creates a normal server socket with default values. The sending timeout is set to infinite time. The receiving timeout is set to infinite time. The message sending buffer is set to 8192 bytes. The message receiving buffer is set to 8192 bytes.

Method Detail

createServerSocket

public java.net.ServerSocket createServerSocket(java.net.InetSocketAddress socketAddress)
                                         throws java.lang.Exception
Creates non-secured server socket.

Specified by:
createServerSocket in interface IServerSecurityFactory
Parameters:
socketAddress - address
Returns:
server socket
Throws:
java.lang.Exception

setSendTimeout

public void setSendTimeout(int sendTimeout)
Description copied from interface: IServerSecurityFactory
Sets timeout for sending a response message. 0 means infinite time (use 30000 by default)

Specified by:
setSendTimeout in interface IServerSecurityFactory

getSendTimeout

public int getSendTimeout()
Description copied from interface: IServerSecurityFactory
Returns timeout setup for sending a response message.

Specified by:
getSendTimeout in interface IServerSecurityFactory
Returns:
sending timeout in milliseconds

setReceiveTimeout

public void setReceiveTimeout(int receiveTimeout)
Description copied from interface: IServerSecurityFactory
Sets timeout for receiving a message. 0 means infinite time (use 30000 by default)

Specified by:
setReceiveTimeout in interface IServerSecurityFactory

getReceiveTimeout

public int getReceiveTimeout()
Description copied from interface: IServerSecurityFactory
Returns timeout setup for receiving a message.

Specified by:
getReceiveTimeout in interface IServerSecurityFactory
Returns:
receiving timeout in milliseconds

setSendBufferSize

public void setSendBufferSize(int size)
Description copied from interface: IServerSecurityFactory
Sets the size of sending buffer in bytes.

Specified by:
setSendBufferSize in interface IServerSecurityFactory
Parameters:
size - size of the buffer in bytes. (use 8192 by default)

getSendBufferSize

public int getSendBufferSize()
Description copied from interface: IServerSecurityFactory
Returns the size of the sending buffer in bytes.

Specified by:
getSendBufferSize in interface IServerSecurityFactory
Returns:
size of the sending buffer

setReceiveBufferSize

public void setReceiveBufferSize(int size)
Description copied from interface: IServerSecurityFactory
Sets the size of receiving buffer in bytes.

Specified by:
setReceiveBufferSize in interface IServerSecurityFactory
Parameters:
size - size of the buffer in bytes. (use 8192 by default)

getReceiveBufferSize

public int getReceiveBufferSize()
Description copied from interface: IServerSecurityFactory
Returns the size of the receiving buffer in bytes.

Specified by:
getReceiveBufferSize in interface IServerSecurityFactory
Returns:
size of the receiving buffer

setReuseAddress

public void setReuseAddress(boolean allowReuseAddress)
Description copied from interface: IServerSecurityFactory
Sets the flag indicating whether the socket can be bound to the address which is already in use.

Specified by:
setReuseAddress in interface IServerSecurityFactory
Parameters:
allowReuseAddress - true if the socket can be bound to the address which is already in use.

getReuseAddress

public boolean getReuseAddress()
Description copied from interface: IServerSecurityFactory
Gets the flag indicating whether the socket can be bound to the address which is already in use.

Specified by:
getReuseAddress in interface IServerSecurityFactory
Returns:
true if the socket can be bound to the address which is already in use.