Package com.tailf.conf
Interface SocketFactoryCallback
public interface SocketFactoryCallback
Interface for user defined creation/wrapping of sockets.
-
Method Summary
Modifier and TypeMethodDescriptiongetSocket(Object caller, SocketAddress address) Deprecated.default SocketgetSocket(SocketAddress address) Retrieve a socket connected to a specified addressgetUnconnectedSocket(Object caller, ProtocolFamily family) Deprecated.default SocketgetUnconnectedSocket(ProtocolFamily family) Retrieve an unconnected socket.wrapSocket(Socket socket) Wrap an already connected socket.
-
Method Details
-
getUnconnectedSocket
@Deprecated Socket getUnconnectedSocket(Object caller, ProtocolFamily family) throws IOException, ConfException Deprecated.Retrieve an unconnected socket. Such socket can be used when e.g a bind() call is necessary before the connect() is performed. The connect() call is performed by the requestor.- Parameters:
caller- The requestor object instancefamily- The protocol family- Returns:
- An unconnected socket
- Throws:
IOExceptionConfException
-
getUnconnectedSocket
Retrieve an unconnected socket. Such socket can be used when e.g a bind() call is necessary before the connect() is performed. The connect() call is performed by the requestor.- Parameters:
family- The protocol family- Returns:
- An unconnected socket
- Throws:
IOExceptionConfException
-
getSocket
@Deprecated Socket getSocket(Object caller, SocketAddress address) throws IOException, ConfException Deprecated.Retrieve a socket connected to a specified address- Parameters:
caller- The requestor object instanceaddress- The address to connect to- Returns:
- the socket connected to address
- Throws:
IOExceptionConfException
-
getSocket
Retrieve a socket connected to a specified address- Parameters:
address- The address to connect to- Returns:
- the socket connected to address
- Throws:
IOExceptionConfException
-
wrapSocket
Wrap an already connected socket. NOTE: This method might be called for a socket that has already been wrapped.- Parameters:
socket- The socket to wrap
-
getSocket(SocketAddress).