Package org.jppf.comm.socket
Interface SocketInitializer
public interface SocketInitializer
Common interface for objects that establish a connection with a remote socket.
- Author:
- Laurent Cohen
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFactory class forSocketInitializers. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this initializer.Get the last captured exception.booleaninitialize(SocketWrapper socketWrapper) Initialize the underlying socket client, by starting aTimerand a correspondingTimerTaskuntil a specified amount of time has passed.booleanisClosed()Determine whether this socket initializer has been intentionally closed.
-
Method Details
-
initialize
Initialize the underlying socket client, by starting aTimerand a correspondingTimerTaskuntil a specified amount of time has passed.- Parameters:
socketWrapper- the socket wrapper to initialize.- Returns:
- whether the initialization was successful.
-
close
void close()Close this initializer. -
isClosed
boolean isClosed()Determine whether this socket initializer has been intentionally closed.- Returns:
- true if this socket initializer has been intentionally closed, false otherwise.
-
getLastException
Exception getLastException()Get the last captured exception.- Returns:
- the last captured exception, if any, otherwise
null.
-