Class OioDatagramChannel
- java.lang.Object
-
- org.jboss.netty.channel.AbstractChannel
-
- org.jboss.netty.channel.socket.oio.AbstractOioChannel
-
- org.jboss.netty.channel.socket.oio.OioDatagramChannel
-
- All Implemented Interfaces:
java.lang.Comparable<Channel>,Channel,DatagramChannel
final class OioDatagramChannel extends AbstractOioChannel implements DatagramChannel
-
-
Field Summary
Fields Modifier and Type Field Description private DatagramChannelConfigconfig(package private) java.net.MulticastSocketsocket-
Fields inherited from class org.jboss.netty.channel.socket.oio.AbstractOioChannel
interestOpsLock, remoteAddress, worker, workerThread
-
Fields inherited from interface org.jboss.netty.channel.Channel
OP_NONE, OP_READ, OP_READ_WRITE, OP_WRITE
-
-
Constructor Summary
Constructors Constructor Description OioDatagramChannel(ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidcloseSocket()private voidensureBound()DatagramChannelConfiggetConfig()Returns the configuration of this channel.(package private) java.net.InetSocketAddressgetLocalSocketAddress()(package private) java.net.InetSocketAddressgetRemoteSocketAddress()(package private) booleanisSocketBound()(package private) booleanisSocketClosed()(package private) booleanisSocketConnected()ChannelFuturejoinGroup(java.net.InetAddress multicastAddress)Joins a multicast group.ChannelFuturejoinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)Joins the specified multicast group at the specified interface.ChannelFutureleaveGroup(java.net.InetAddress multicastAddress)Leaves a multicast group.ChannelFutureleaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)Leaves a multicast group on a specified local interface.-
Methods inherited from class org.jboss.netty.channel.socket.oio.AbstractOioChannel
getInternalInterestOps, getLocalAddress, getRemoteAddress, isBound, isConnected, setClosed, setInternalInterestOps, write
-
Methods inherited from class org.jboss.netty.channel.AbstractChannel
bind, close, compareTo, connect, disconnect, equals, getAttachment, getCloseFuture, getFactory, getId, getInterestOps, getParent, getPipeline, getSucceededFuture, getUnsupportedOperationFuture, getUserDefinedWritability, hashCode, isOpen, isReadable, isWritable, setAttachment, setInterestOps, setReadable, setUnwritable, setUserDefinedWritability, setWritable, toString, unbind, write
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jboss.netty.channel.Channel
bind, close, connect, disconnect, getAttachment, getCloseFuture, getFactory, getId, getInterestOps, getParent, getPipeline, getUserDefinedWritability, isBound, isConnected, isOpen, isReadable, isWritable, setAttachment, setInterestOps, setReadable, setUserDefinedWritability, unbind, write, write
-
Methods inherited from interface org.jboss.netty.channel.socket.DatagramChannel
getLocalAddress, getRemoteAddress
-
-
-
-
Field Detail
-
socket
final java.net.MulticastSocket socket
-
config
private final DatagramChannelConfig config
-
-
Constructor Detail
-
OioDatagramChannel
OioDatagramChannel(ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink)
-
-
Method Detail
-
getConfig
public DatagramChannelConfig getConfig()
Description copied from interface:ChannelReturns the configuration of this channel.- Specified by:
getConfigin interfaceChannel- Specified by:
getConfigin interfaceDatagramChannel
-
joinGroup
public ChannelFuture joinGroup(java.net.InetAddress multicastAddress)
Description copied from interface:DatagramChannelJoins a multicast group.- Specified by:
joinGroupin interfaceDatagramChannel
-
joinGroup
public ChannelFuture joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
Description copied from interface:DatagramChannelJoins the specified multicast group at the specified interface.- Specified by:
joinGroupin interfaceDatagramChannel
-
ensureBound
private void ensureBound()
-
leaveGroup
public ChannelFuture leaveGroup(java.net.InetAddress multicastAddress)
Description copied from interface:DatagramChannelLeaves a multicast group.- Specified by:
leaveGroupin interfaceDatagramChannel
-
leaveGroup
public ChannelFuture leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
Description copied from interface:DatagramChannelLeaves a multicast group on a specified local interface.- Specified by:
leaveGroupin interfaceDatagramChannel
-
isSocketBound
boolean isSocketBound()
- Specified by:
isSocketBoundin classAbstractOioChannel
-
isSocketConnected
boolean isSocketConnected()
- Specified by:
isSocketConnectedin classAbstractOioChannel
-
getLocalSocketAddress
java.net.InetSocketAddress getLocalSocketAddress() throws java.lang.Exception- Specified by:
getLocalSocketAddressin classAbstractOioChannel- Throws:
java.lang.Exception
-
getRemoteSocketAddress
java.net.InetSocketAddress getRemoteSocketAddress() throws java.lang.Exception- Specified by:
getRemoteSocketAddressin classAbstractOioChannel- Throws:
java.lang.Exception
-
closeSocket
void closeSocket()
- Specified by:
closeSocketin classAbstractOioChannel
-
isSocketClosed
boolean isSocketClosed()
- Specified by:
isSocketClosedin classAbstractOioChannel
-
-