Top Description Constructors Methods
org.newsclub.net.unix

pack-priv final Class AFGenericDatagramSocket

extends AFDatagramSocket<AFGenericSocketAddress>
implements AFGenericSocketExtensions
Class Inheritance
All Implemented Interfaces
org.newsclub.net.unix.AFGenericSocketExtensions, org.newsclub.net.unix.AFSocketExtensions
Imports
java.io.FileDescriptor, .IOException, java.net.DatagramSocket

A DatagramSocket implementation that works with AF_SYSTEM sockets.
Author
Christian Kohlschütter

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public AFGenericDatagramChannel
getChannel()

Overrides org.newsclub.net.unix.AFDatagramSocket.getChannel.

Returns the unique java.nio.channels.DatagramChannel object associated with this datagram socket, if any.

protected AFGenericSocketImplExtensions
getImplExtensions()

Overrides org.newsclub.net.unix.AFDatagramSocket.getImplExtensions.

Returns the internal helper instance for address-specific extensions.

protected AFGenericDatagramChannel
newChannel()

Implements abstract org.newsclub.net.unix.AFDatagramSocket.newChannel.

Creates a new DatagramChannel that is associated with this socket.

protected AFDatagramSocket<AFGenericSocketAddress>
newDatagramSocketInstance()

Implements abstract org.newsclub.net.unix.AFDatagramSocket.newDatagramSocketInstance.

Returns a new AFDatagramSocket instance to be used for accept(), i.e., no FileDescriptor is associated.

public static AFGenericDatagramSocket

Returns:

The new instance.
newInstance
()

Returns a new AFGenericDatagramSocket instance, using the default AFSocketType#SOCK_DGRAM socket type.

public static AFGenericDatagramSocket

Returns:

The new instance.
newInstance
(AFSocketType
The socket type.
socketType
)

Returns a new AFGenericDatagramSocket instance for the given socket type.

Inherited from org.newsclub.net.unix.AFDatagramSocket:
acceptaccept1addressFamilybindcloseconnectconnectensureAncillaryReceiveBufferSizegetAFImplgetAFImplgetAncillaryDataSupportgetAncillaryReceiveBufferSizegetFileDescriptorgetLocalSocketAddressgetOptiongetRemoteSocketAddressinternalDummyBindinternalDummyConnectisBoundisClosedisConnectedisDeleteOnCloselistennewInstancenewInstancepeekreceivesendsetAncillaryReceiveBufferSizesetDeleteOnClosesetOptionsetShutdownOnClosesocketAddressClass

Constructor Detail

AFGenericDatagramSocketback to summary
pack-priv AFGenericDatagramSocket(FileDescriptor fd) throws IOException
AFGenericDatagramSocketback to summary
pack-priv AFGenericDatagramSocket(FileDescriptor fd, AFSocketType socketType) throws IOException

Method Detail

getChannelback to summary
public AFGenericDatagramChannel getChannel()

Overrides org.newsclub.net.unix.AFDatagramSocket.getChannel.

Doc from java.net.DatagramSocket.getChannel.

Returns the unique java.nio.channels.DatagramChannel object associated with this datagram socket, if any.

A datagram socket will have a channel if, and only if, the channel itself was created via the DatagramChannel.open method.

Returns:AFGenericDatagramChannel

the datagram channel associated with this datagram socket, or null if this socket was not created for a channel

Annotations
@Override
getImplExtensionsback to summary
protected AFGenericSocketImplExtensions getImplExtensions()

Overrides org.newsclub.net.unix.AFDatagramSocket.getImplExtensions.

Doc from org.newsclub.net.unix.AFDatagramSocket.getImplExtensions.

Returns the internal helper instance for address-specific extensions.

Returns:AFGenericSocketImplExtensions

The helper instance.

Annotations
@Override
newChannelback to summary
protected AFGenericDatagramChannel newChannel()

Implements abstract org.newsclub.net.unix.AFDatagramSocket.newChannel.

Doc from org.newsclub.net.unix.AFDatagramSocket.newChannel.

Creates a new DatagramChannel that is associated with this socket.

Returns:AFGenericDatagramChannel

The channel.

Annotations
@Override
newDatagramSocketInstanceback to summary
protected AFDatagramSocket<AFGenericSocketAddress> newDatagramSocketInstance() throws IOException

Implements abstract org.newsclub.net.unix.AFDatagramSocket.newDatagramSocketInstance.

Doc from org.newsclub.net.unix.AFDatagramSocket.newDatagramSocketInstance.

Returns a new AFDatagramSocket instance to be used for accept(), i.e., no FileDescriptor is associated.

Returns:AFDatagramSocket<AFGenericSocketAddress>

The new instance.

Annotations
@Override
Exceptions
IOException:
on error.
newInstanceback to summary
public static AFGenericDatagramSocket newInstance() throws IOException

Returns a new AFGenericDatagramSocket instance, using the default AFSocketType#SOCK_DGRAM socket type.

Returns:AFGenericDatagramSocket

The new instance.

Exceptions
IOException:
on error.
newInstanceback to summary
public static AFGenericDatagramSocket newInstance(AFSocketType socketType) throws IOException

Returns a new AFGenericDatagramSocket instance for the given socket type.

Parameters
socketType:AFSocketType

The socket type.

Returns:AFGenericDatagramSocket

The new instance.

Exceptions
IOException:
on error.