|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.client.comm.ClientConnector
com.sun.sgs.impl.client.simple.SimpleClientConnector
class SimpleClientConnector
A basic implementation of a ClientConnector which uses an
Connector to establish connections.
The
constructor
supports the following properties:
host
port
connectTimeout
| Field Summary | |
|---|---|
static String |
DEFAULT_CONNECT_FAILURE_MESSAGE
The default connect failure message: "Unable to connect to server" |
static long |
DEFAULT_CONNECT_TIMEOUT
The default timeout for connect operations: 5000L ms |
| Constructor Summary | |
|---|---|
SimpleClientConnector(Properties properties)
Creates a new connector with the given properties. |
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels a pending connect operation on this ClientConnecton. |
void |
connect(ClientConnectionListener connectionListener)
Actively initates a connection to the target remote address. |
| Methods inherited from class com.sun.sgs.impl.client.comm.ClientConnector |
|---|
create, setConnectorFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_CONNECT_TIMEOUT
public static final String DEFAULT_CONNECT_FAILURE_MESSAGE
| Constructor Detail |
|---|
SimpleClientConnector(Properties properties)
properties - the properties for this connector| Method Detail |
|---|
public void cancel()
throws IOException
ClientConnecton.
cancel in class ClientConnectorIOException - if an IO error occurs synchronously
public void connect(ClientConnectionListener connectionListener)
throws IOException
ClientConnectionListener.connected(com.sun.sgs.impl.client.comm.ClientConnection)
will be called asynchronously on the listener upon successful
connection, or ClientConnectionListener.disconnected(boolean, byte[]) if it
fails.
connect in class ClientConnectorconnectionListener - the listener for all IO events on the
connection, including the result of the connection attempt
IOException - if an IO error occurs synchronously
|
Project Darkstar, Version 0.9.11.5 2013-07-29 22:08:40 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||