Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.connection
Class ConnectionManager

java.lang.Object
  extended by com.genesyslab.platform.commons.connection.ConnectionManager

public final class ConnectionManager
extends java.lang.Object

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 only one implementation - JBoss Netty framework.
It supports client and server connections, and TLS including upgrade of already opened connection to secure mode.


Field Summary
static java.lang.String CONN_FACTORY_KEY
          Deprecated.  
 
Method Summary
static ConnectionAcceptor createAcceptor(java.net.SocketAddress address, ConnectionListener listener, ConnectionContext ctx)
          Creates connection acceptor object for the specified address.
static ConnectionAcceptor createAcceptor(java.lang.String host, int port, ConnectionListener listener, ConnectionContext ctx)
          Creates connection acceptor object for the specified address.
static Connection createConnection(java.net.InetAddress address, int port, ConnectionContext ctx)
          Creates connection object for the specified server.
static Connection createConnection(java.lang.String host, int port, ConnectionContext ctx)
          Creates connection object for the specified server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONN_FACTORY_KEY

@Deprecated
public static final java.lang.String CONN_FACTORY_KEY
Deprecated. 
See Also:
PsdkCustomization, PsdkCustomization.PsdkOption#PsdkConnectionFactory, Constant Field Values
Method Detail

createConnection

public static Connection createConnection(java.lang.String host,
                                          int port,
                                          ConnectionContext ctx)
Creates connection object for the specified server. Connection is not opened upon creation. You have to use its open method to establish network connection.

Parameters:
host - host to connect to
port - port to connect to
ctx - context of connection
Returns:
connection for the specified parameters

createConnection

public static Connection createConnection(java.net.InetAddress address,
                                          int port,
                                          ConnectionContext ctx)
Creates connection object for the specified server. Connection is not opened upon creation. You have to use its open method to establish network connection.

Parameters:
address - host to connect to
port - port to connect to
ctx - context of connection
Returns:
connection for the specified parameters

createAcceptor

public static ConnectionAcceptor createAcceptor(java.lang.String host,
                                                int port,
                                                ConnectionListener listener,
                                                ConnectionContext ctx)
Creates connection acceptor object for the specified address. Acceptor is not bound upon creation. You have to use its startAccepting method to bind a socket.

Parameters:
host - host to listen
port - port to listen on
listener - a listener to notify about new connections
Returns:
connection for the specified parameters

createAcceptor

public static ConnectionAcceptor createAcceptor(java.net.SocketAddress address,
                                                ConnectionListener listener,
                                                ConnectionContext ctx)
Creates connection acceptor object for the specified address. Acceptor is not bound upon creation. You have to use its startAccepting method to bind a socket.

Parameters:
address - address to listen
listener - a listener to notify about new connections
Returns:
connection for the specified parameters

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.