Top Description Fields Constructors Methods
org.newsclub.net.unix

public final Class AFSocketOption<T>

extends Object
implements SocketOption<T>
Class Inheritance
All Implemented Interfaces
java.net.SocketOption
Type Parameters
<T>
The option's value type.
Imports
java.net.SocketOption

A special socket option supported by some junixsocket-based implementation.
Author
Christian Kohlschütter

Field Summary

Modifier and TypeField and Description
private final int
private final String
private final int
private final Class<T>

Constructor Summary

AccessConstructor and Description
public
AFSocketOption(String
The name of the option.
name
,
Class<T>
The value type.
type
,
int
The socket level (as defined in junixsocket-native).
level
,
int
The option name (as defined in junixsocket-native).
optionName
)

Creates a new socket option.

Method Summary

Modifier and TypeMethod and Description
pack-priv int
public String
name()

Implements java.net.SocketOption.name.

Returns the name of the socket option.

pack-priv int
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public Class<T>
type()

Implements java.net.SocketOption.type.

Returns the type of the socket option value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

levelback to summary
private final int level
nameback to summary
private final String name
optionNameback to summary
private final int optionName
typeback to summary
private final Class<T> type

Constructor Detail

AFSocketOptionback to summary
public AFSocketOption(String name, Class<T> type, int level, int optionName)

Creates a new socket option. This should only be called by AFSocket implementations.

Parameters
name:String

The name of the option.

type:Class<T>

The value type.

level:int

The socket level (as defined in junixsocket-native).

optionName:int

The option name (as defined in junixsocket-native).

Method Detail

levelback to summary
pack-priv int level()
nameback to summary
public String name()

Implements java.net.SocketOption.name.

Doc from java.net.SocketOption.name.

Returns the name of the socket option.

Returns:String

the name of the socket option

Annotations
@Override
optionNameback to summary
pack-priv int optionName()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
typeback to summary
public Class<T> type()

Implements java.net.SocketOption.type.

Doc from java.net.SocketOption.type.

Returns the type of the socket option value.

Returns:Class<T>

the type of the socket option value

Annotations
@Override