APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.net.ext

public abstract Class ExtendedSocketOptions

extends Object
Class Inheritance
Known Direct Subclasses
sun.net.ext.ExtendedSocketOptions.NoExtendedSocketOptions
Imports
java.io.FileDescriptor, java.net.SocketException, .SocketOption, java.util.Collections, .HashSet, .Set

Defines the infrastructure to support extended socket options, beyond those defined in java.net.StandardSocketOptions. Extended socket options are accessed through the jdk.net API, which is in the jdk.net module.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private final Set<SocketOption<?>>
private final Set<SocketOption<?>>
private static volatile ExtendedSocketOptions
private final Set<SocketOption<?>>
private final Set<SocketOption<?>>
public static final short
public static final short
private final Set<SocketOption<?>>

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static Set<SocketOption<?>>
clientSocketOptions()

Returns the (possibly empty) set of extended socket options for stream-oriented connecting sockets.

public static Set<SocketOption<?>>
datagramSocketOptions()

Returns the (possibly empty) set of extended socket options for datagram-oriented sockets.

public static ExtendedSocketOptions
public abstract Object
getOption(FileDescriptor fd, SocketOption<?> option, boolean isIPv6)

Returns the value of a socket option, for the given socket.

private static boolean
public final boolean
isOptionSupported(SocketOption<?> option)

Tells whether or not the option is supported.

private static boolean
isStreamOption(SocketOption<?> option, boolean server)

private static boolean
public final Set<SocketOption<?>>
options()

Return the, possibly empty, set of extended socket options available.

private Set<SocketOption<?>>
options0(short type, boolean server)

public static synchronized void
register(ExtendedSocketOptions extOptions)

Registers support for extended socket options.

public static Set<SocketOption<?>>
serverSocketOptions()

Returns the (possibly empty) set of extended socket options for stream-oriented listening sockets.

public abstract void
setOption(FileDescriptor fd, SocketOption<?> option, Object value, boolean isIPv6)

Sets the value of a socket option, for the given socket.

private final Set<SocketOption<?>>
unixDomainClientOptions()

Return the, possibly empty, set of extended socket options available for Unix domain client sockets.

public static Set<SocketOption<?>>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clientStreamOptionsback to summary
private final Set<SocketOption<?>> clientStreamOptions
datagramOptionsback to summary
private final Set<SocketOption<?>> datagramOptions
instanceback to summary
private static volatile ExtendedSocketOptions instance
optionsback to summary
private final Set<SocketOption<?>> options
serverStreamOptionsback to summary
private final Set<SocketOption<?>> serverStreamOptions
SOCK_DGRAMback to summary
public static final short SOCK_DGRAM
SOCK_STREAMback to summary
public static final short SOCK_STREAM
unixDomainClientOptionsback to summary
private final Set<SocketOption<?>> unixDomainClientOptions

Constructor Detail

ExtendedSocketOptionsback to summary
protected ExtendedSocketOptions(Set<SocketOption<?>> options)

Method Detail

clientSocketOptionsback to summary
public static Set<SocketOption<?>> clientSocketOptions()

Returns the (possibly empty) set of extended socket options for stream-oriented connecting sockets.

datagramSocketOptionsback to summary
public static Set<SocketOption<?>> datagramSocketOptions()

Returns the (possibly empty) set of extended socket options for datagram-oriented sockets.

getInstanceback to summary
public static ExtendedSocketOptions getInstance()
getOptionback to summary
public abstract Object getOption(FileDescriptor fd, SocketOption<?> option, boolean isIPv6) throws SocketException

Returns the value of a socket option, for the given socket.

isDatagramOptionback to summary
private static boolean isDatagramOption(SocketOption<?> option)
isOptionSupportedback to summary
public final boolean isOptionSupported(SocketOption<?> option)

Tells whether or not the option is supported.

isStreamOptionback to summary
private static boolean isStreamOption(SocketOption<?> option, boolean server)
isUnixDomainOptionback to summary
private static boolean isUnixDomainOption(SocketOption<?> option)
optionsback to summary
public final Set<SocketOption<?>> options()

Return the, possibly empty, set of extended socket options available.

options0back to summary
private Set<SocketOption<?>> options0(short type, boolean server)
registerback to summary
public static synchronized void register(ExtendedSocketOptions extOptions)

Registers support for extended socket options. Invoked by the jdk.net module.

serverSocketOptionsback to summary
public static Set<SocketOption<?>> serverSocketOptions()

Returns the (possibly empty) set of extended socket options for stream-oriented listening sockets.

setOptionback to summary
public abstract void setOption(FileDescriptor fd, SocketOption<?> option, Object value, boolean isIPv6) throws SocketException

Sets the value of a socket option, for the given socket.

unixDomainClientOptionsback to summary
private final Set<SocketOption<?>> unixDomainClientOptions()

Return the, possibly empty, set of extended socket options available for Unix domain client sockets. Note, there are no extended Unix domain server options.

unixDomainSocketOptionsback to summary
public static Set<SocketOption<?>> unixDomainSocketOptions()
sun.net.ext back to summary

pack-priv final Class ExtendedSocketOptions.NoExtendedSocketOptions

extends ExtendedSocketOptions
Class Inheritance

Field Summary

Inherited from sun.net.ext.ExtendedSocketOptions:
SOCK_DGRAMSOCK_STREAM

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Object
getOption(FileDescriptor fd, SocketOption<?> option, boolean isIPv6)

Implements abstract sun.net.ext.ExtendedSocketOptions.getOption.

Returns the value of a socket option, for the given socket.

public void
setOption(FileDescriptor fd, SocketOption<?> option, Object value, boolean isIPv6)

Implements abstract sun.net.ext.ExtendedSocketOptions.setOption.

Sets the value of a socket option, for the given socket.

Inherited from sun.net.ext.ExtendedSocketOptions:
clientSocketOptionsdatagramSocketOptionsgetInstanceisOptionSupportedoptionsregisterserverSocketOptionsunixDomainSocketOptions

Constructor Detail

NoExtendedSocketOptionsback to summary
pack-priv NoExtendedSocketOptions()

Method Detail

getOptionback to summary
public Object getOption(FileDescriptor fd, SocketOption<?> option, boolean isIPv6) throws SocketException

Implements abstract sun.net.ext.ExtendedSocketOptions.getOption.

Doc from sun.net.ext.ExtendedSocketOptions.getOption.

Returns the value of a socket option, for the given socket.

Annotations
@Override
setOptionback to summary
public void setOption(FileDescriptor fd, SocketOption<?> option, Object value, boolean isIPv6) throws SocketException

Implements abstract sun.net.ext.ExtendedSocketOptions.setOption.

Doc from sun.net.ext.ExtendedSocketOptions.setOption.

Sets the value of a socket option, for the given socket.

Annotations
@Override