Top Description Constructors Methods
org.newsclub.net.unix

pack-priv abstract Class AFGenericSocketFactory

extends AFSocketFactory<AFGenericSocketAddress>
Class Inheritance
Imports
java.io.IOException, java.net.Socket, .SocketException

The base for a SocketFactory that connects to unknown-type sockets.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected AFGenericSocket

Returns:

The very socket.
configure
(AFGenericSocket
The socket.
sock
)

Performs some optional configuration on a newly created socket.

protected final AFGenericSocket
connectTo(AFGenericSocketAddress
The address to connect to.
addr
)

Implements abstract org.newsclub.net.unix.AFSocketFactory.connectTo.

Creates a new AFSocket, connected to the given address.

public final Socket
createSocket()

Implements abstract org.newsclub.net.unix.AFSocketFactory.createSocket.

Creates an unconnected socket.

Inherited from org.newsclub.net.unix.AFSocketFactory:
createSocketcreateSocketcreateSocketcreateSocketisInetAddressSupported

Constructor Detail

AFGenericSocketFactoryback to summary
protected AFGenericSocketFactory()

Creates a AFGenericSocketFactory.

Method Detail

configureback to summary
protected AFGenericSocket configure(AFGenericSocket sock) throws SocketException

Performs some optional configuration on a newly created socket.

Parameters
sock:AFGenericSocket

The socket.

Returns:AFGenericSocket

The very socket.

Exceptions
SocketException:
on error.
connectToback to summary
protected final AFGenericSocket connectTo(AFGenericSocketAddress addr) throws IOException

Implements abstract org.newsclub.net.unix.AFSocketFactory.connectTo.

Doc from org.newsclub.net.unix.AFSocketFactory.connectTo.

Creates a new AFSocket, connected to the given address.

Parameters
addr:AFGenericSocketAddress

The address to connect to.

Returns:AFGenericSocket

The socket instance.

Annotations
@Override
Exceptions
IOException:
on error.
createSocketback to summary
public final Socket createSocket() throws SocketException

Implements abstract org.newsclub.net.unix.AFSocketFactory.createSocket.

Doc from javax.net.SocketFactory.createSocket.

Creates an unconnected socket.

Returns:Socket

the unconnected socket

Annotations
@Override