Package org.jppf.client
Class AbstractClientConnectionHandler
java.lang.Object
org.jppf.client.AbstractClientConnectionHandler
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
AbstractClassServerDelegate,TaskServerConnectionHandler
Common abstract superclass for client connections to a server.
- Author:
- Laurent Cohen, Jeff Rosen
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractClientConnectionHandler(JPPFClientConnection owner, String name) Initialize this connection with the specified owner. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidCreate the ssl connection over an established plain connection.org.jppf.comm.socket.SocketWrapperGet the socket client used to communicate over a socket connection.org.jppf.comm.socket.SocketInitializerGet the object that performs connection attempts until the max retry time is reached or connection succeeds.voidinit()Initialize the connection.voidInitialize the underlying socket connection of this connection handler.booleanisClosed()
-
Constructor Details
-
AbstractClientConnectionHandler
Initialize this connection with the specified owner.- Parameters:
owner- the client connection which owns this connection handler.name- the name given to this connection.
-
-
Method Details
-
getSocketClient
Get the socket client used to communicate over a socket connection.- Returns:
- a
SocketWrapperinstance. - Throws:
Exception- if any error occurs.
-
createSSLConnection
Create the ssl connection over an established plain connection.- Throws:
Exception- if any error occurs.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
isClosed
public boolean isClosed() -
getSocketInitializer
public org.jppf.comm.socket.SocketInitializer getSocketInitializer()Get the object that performs connection attempts until the max retry time is reached or connection succeeds.- Returns:
- a
SocketInitializerinstance.
-
init
Initialize the connection.- Throws:
Exception- if an error is raised while initializing the connection.
-
initSocketClient
Initialize the underlying socket connection of this connection handler.- Throws:
Exception- if an error is raised during initialization.
-