Top Description Constructors Methods
org.newsclub.net.unix

public abstract Class AFSocketPair<T extends AFSomeSocket>

extends CloseablePair<T extends AFSomeSocket>
Class Inheritance
Known Direct Subclasses
org.newsclub.net.unix.AFUNIXSocketPair, org.newsclub.net.unix.AFGenericSocketPair
Type Parameters
<T>
The socket type.
Imports
java.io.Closeable, org.eclipse.jdt.annotation.NonNull

A pair of sockets.
Author
Christian Kohlschütter

Constructor Summary

AccessConstructor and Description
protected
AFSocketPair(T
The first socket.
a
,
T
The second socket.
b
)

Creates a socket pair.

protected
AFSocketPair(T
The first socket.
a
,
T
The second socket.
b
,
Closeable
Some closeable that is also closed upon close(), or null.
alsoClose
)

Creates a socket pair.

Method Summary

Modifier and TypeMethod and Description
public final @NonNull T

Returns:

The first socket.
getSocket1
()

Returns the first socket of the pair.

public final @NonNull T

Returns:

The second socket.
getSocket2
()

Returns the second socket of the pair.

Inherited from org.newsclub.net.unix.CloseablePair:
closegetFirstgetSecond

Constructor Detail

AFSocketPairback to summary
protected AFSocketPair(T a, T b)

Creates a socket pair.

Parameters
a:T

The first socket.

b:T

The second socket.

AFSocketPairback to summary
protected AFSocketPair(T a, T b, Closeable alsoClose)

Creates a socket pair.

Parameters
a:T

The first socket.

b:T

The second socket.

alsoClose:Closeable

Some closeable that is also closed upon close(), or null.

Method Detail

getSocket1back to summary
public final @NonNull T getSocket1()

Returns the first socket of the pair.

Returns:@NonNull T

The first socket.

getSocket2back to summary
public final @NonNull T getSocket2()

Returns the second socket of the pair.

Returns:@NonNull T

The second socket.