|
Configuration Platform SDK 7.6 API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.connection.ConnectionManager
Factory for connections. You can change connection implementation by setting system property 'com.genesyslab.platform.commons.connection.factory.class' to fully qualified name of the connection factory implementation. Currently there is two implementations. First one is default implementation based on single thread and multiplexed IO. The second implementation creates two threads per connection and uses stream-based IO. Its usage is recommended only in cases when default implementation does not work for you (e.g. JRE <= 1.3). It's perfomance can be quite slow for large amount of connections and some advanced connections (like HA connection in TLib) can be unreliable with it.
Method Summary | |
static ConnectionAcceptor |
createAcceptor(java.net.SocketAddress address,
ConnectionListener listener)
Create connection acceptor object for the specified address. |
static ConnectionAcceptor |
createAcceptor(java.lang.String host,
int port,
ConnectionListener listener)
Create connection acceptor object for the specified address. |
static Connection |
createConnection(java.net.InetAddress address,
int port)
Create connection object for the specified server. |
static Connection |
createConnection(java.lang.String host,
int port)
Create connection object for the specified server. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Connection createConnection(java.lang.String host, int port)
open
method to establish network connection.
host
- host to connect toport
- port to connect to
public static Connection createConnection(java.net.InetAddress address, int port)
open
method to establish network connection.
address
- host to connect toport
- port to connect to
public static ConnectionAcceptor createAcceptor(java.lang.String host, int port, ConnectionListener listener)
startAccepting
method to bind a socket.
host
- host to listenport
- port to listen onlistener
- a listener to notify about new connections
public static ConnectionAcceptor createAcceptor(java.net.SocketAddress address, ConnectionListener listener)
startAccepting
method to bind a socket.
address
- address to listenlistener
- a listener to notify about new connections
|
Configuration Platform SDK 7.6 API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |