public class HandshakeableSocketConnector extends TimeableConnection
This class works similar to SocketConnector to add in handshaking capability. The event processing is as follows: connection starting, handshake called, connection established, handle called, connection closed.
SocketConnectorlistenerList| Constructor and Description |
|---|
HandshakeableSocketConnector()
Do-nothing constructor.
|
HandshakeableSocketConnector(HandshakeableSocketHandler socketHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
aconnect(ConnectionModel connectionModel)
makes a connection asynchronously using internal socket handler.
|
void |
aconnect(HandshakeableSocketHandler socketHandler,
ConnectionModel connectionModel)
makes a connection asynchronously.
|
void |
connect(ConnectionModel connectionModel)
Synchronous connect method using internal socket handler.
|
void |
connect(HandshakeableSocketHandler socketHandler,
ConnectionModel connectionModel)
Synchronous connect method.
|
HandshakeableSocketHandler |
getSocketHandler() |
void |
setSocketHandler(HandshakeableSocketHandler socketHandler)
override parent to check and make sure the handler is a HandshakeableSocketHandler.
|
fireConnectionClosed, fireConnectionEstablishedaddConnectionListener, fireConnectionStarting, fireConnectionStartingWithoutVeto, removeConnectionListenerpublic HandshakeableSocketConnector()
public HandshakeableSocketConnector(HandshakeableSocketHandler socketHandler)
public void connect(ConnectionModel connectionModel) throws ConnectionFailedException
ConnectionFailedExceptionpublic void connect(HandshakeableSocketHandler socketHandler, ConnectionModel connectionModel) throws ConnectionFailedException
ConnectionFailedExceptionpublic void aconnect(ConnectionModel connectionModel)
public void aconnect(HandshakeableSocketHandler socketHandler, ConnectionModel connectionModel)
public HandshakeableSocketHandler getSocketHandler()
public void setSocketHandler(HandshakeableSocketHandler socketHandler)
java.lang.IllegalArgumentException - if socket handler does not implement the right handlerCopyright © 2001-2005 Echomine. All Rights Reserved.