public class UnixDatagramChannel
extends jnr.enxio.channels.AbstractNativeDatagramChannel
Modifier and Type | Class and Description |
---|---|
private static class |
UnixDatagramChannel.DefaultOptionsHolder |
(package private) static class |
UnixDatagramChannel.State |
Modifier and Type | Field and Description |
---|---|
private BindHandler |
bindHandler |
private UnixSocketAddress |
localAddress |
private UnixSocketAddress |
remoteAddress |
private UnixDatagramChannel.State |
state |
private java.util.concurrent.locks.ReadWriteLock |
stateLock |
Modifier | Constructor and Description |
---|---|
private |
UnixDatagramChannel() |
(package private) |
UnixDatagramChannel(int fd) |
(package private) |
UnixDatagramChannel(int fd,
UnixDatagramChannel.State initialState,
boolean initialBoundState) |
(package private) |
UnixDatagramChannel(int fd,
UnixSocketAddress remote) |
Modifier and Type | Method and Description |
---|---|
UnixDatagramChannel |
bind(java.net.SocketAddress local) |
java.nio.channels.DatagramChannel |
connect(java.net.SocketAddress remote) |
UnixDatagramChannel |
connect(UnixSocketAddress remote) |
UnixDatagramChannel |
disconnect() |
java.net.SocketAddress |
getLocalAddress() |
UnixSocketAddress |
getLocalSocketAddress() |
<T> T |
getOption(java.net.SocketOption<T> name) |
java.net.SocketAddress |
getRemoteAddress() |
UnixSocketAddress |
getRemoteSocketAddress() |
(package private) boolean |
isBound() |
boolean |
isConnected() |
java.nio.channels.MembershipKey |
join(java.net.InetAddress group,
java.net.NetworkInterface interf) |
java.nio.channels.MembershipKey |
join(java.net.InetAddress group,
java.net.NetworkInterface interf,
java.net.InetAddress source) |
static UnixDatagramChannel |
open() |
static UnixDatagramChannel[] |
pair() |
int |
read(java.nio.ByteBuffer dst) |
UnixSocketAddress |
receive(java.nio.ByteBuffer src) |
int |
send(java.nio.ByteBuffer src,
java.net.SocketAddress target) |
<T> java.nio.channels.DatagramChannel |
setOption(java.net.SocketOption<T> name,
T value) |
UnixDatagramSocket |
socket() |
java.util.Set<java.net.SocketOption<?>> |
supportedOptions() |
int |
write(java.nio.ByteBuffer src) |
long |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length) |
getFD, implCloseSelectableChannel, implConfigureBlocking, read, setFD
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
begin, close, end, isOpen
private UnixDatagramChannel.State state
private UnixSocketAddress remoteAddress
private UnixSocketAddress localAddress
private final java.util.concurrent.locks.ReadWriteLock stateLock
private final BindHandler bindHandler
private UnixDatagramChannel() throws java.io.IOException
java.io.IOException
UnixDatagramChannel(int fd)
UnixDatagramChannel(int fd, UnixDatagramChannel.State initialState, boolean initialBoundState)
UnixDatagramChannel(int fd, UnixSocketAddress remote) throws java.io.IOException
java.io.IOException
public static final UnixDatagramChannel open() throws java.io.IOException
java.io.IOException
public static final UnixDatagramChannel[] pair() throws java.io.IOException
java.io.IOException
public UnixDatagramChannel bind(java.net.SocketAddress local) throws java.io.IOException
bind
in interface java.nio.channels.NetworkChannel
bind
in class java.nio.channels.DatagramChannel
java.io.IOException
public UnixDatagramChannel connect(UnixSocketAddress remote)
public UnixDatagramChannel disconnect() throws java.io.IOException
disconnect
in class java.nio.channels.DatagramChannel
java.io.IOException
boolean isBound()
public boolean isConnected()
isConnected
in class java.nio.channels.DatagramChannel
public final UnixSocketAddress getRemoteSocketAddress()
public final UnixSocketAddress getLocalSocketAddress()
public UnixSocketAddress receive(java.nio.ByteBuffer src) throws java.io.IOException
receive
in class java.nio.channels.DatagramChannel
java.io.IOException
public int send(java.nio.ByteBuffer src, java.net.SocketAddress target) throws java.io.IOException
send
in class java.nio.channels.DatagramChannel
java.io.IOException
public java.nio.channels.DatagramChannel connect(java.net.SocketAddress remote) throws java.io.IOException
connect
in class java.nio.channels.DatagramChannel
java.io.IOException
public UnixDatagramSocket socket()
socket
in class java.nio.channels.DatagramChannel
public long write(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException
write
in interface java.nio.channels.GatheringByteChannel
write
in class jnr.enxio.channels.AbstractNativeDatagramChannel
java.io.IOException
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
in interface java.nio.channels.ReadableByteChannel
read
in class jnr.enxio.channels.AbstractNativeDatagramChannel
java.io.IOException
public int write(java.nio.ByteBuffer src) throws java.io.IOException
write
in interface java.nio.channels.WritableByteChannel
write
in class jnr.enxio.channels.AbstractNativeDatagramChannel
java.io.IOException
public java.net.SocketAddress getRemoteAddress() throws java.io.IOException
getRemoteAddress
in class java.nio.channels.DatagramChannel
java.io.IOException
public java.net.SocketAddress getLocalAddress() throws java.io.IOException
getLocalAddress
in interface java.nio.channels.NetworkChannel
getLocalAddress
in class java.nio.channels.DatagramChannel
java.io.IOException
public final java.util.Set<java.net.SocketOption<?>> supportedOptions()
public <T> T getOption(java.net.SocketOption<T> name) throws java.io.IOException
java.io.IOException
public <T> java.nio.channels.DatagramChannel setOption(java.net.SocketOption<T> name, T value) throws java.io.IOException
setOption
in interface java.nio.channels.NetworkChannel
setOption
in class java.nio.channels.DatagramChannel
java.io.IOException
public java.nio.channels.MembershipKey join(java.net.InetAddress group, java.net.NetworkInterface interf)
public java.nio.channels.MembershipKey join(java.net.InetAddress group, java.net.NetworkInterface interf, java.net.InetAddress source)