org.glassfish.grizzly.Connection implementation for the UDPNIOTransport
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Holder | |
| private static final Logger | |
| private Map | |
| private final Object | |
| pack-priv Holder | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | block(final InetAddress
The multicast address to join group, final NetworkInterface The network interface on which to join the group networkInterface, final InetAddress The source address to block source)Blocks multicast datagrams from the given source address. |
| public boolean | |
| public boolean | |
| public void | drop(final InetAddress
The multicast address to join group, final NetworkInterface The network interface on which to join the group networkInterface)Drops non-source specific membership in a multicast group. |
| public void | drop(final InetAddress
The multicast address to join group, final NetworkInterface The network interface on which to join the group networkInterface, final InetAddress The source address source)Drops membership in a multicast group. |
| public void | dropAll(final InetAddress
The multicast address to join group, final NetworkInterface The network interface on which to join the group networkInterface)Drops all active membership in a multicast group. |
| protected void | enableInitialOpRead()
Overrides org. Enables OP_READ if it has never been enabled before. |
| public SocketAddress | Returns: the local address of this Connection, or null if it is unconnected.Implements org. Returns the local address of this Connection, or null if it is unconnected. |
| public SocketAddress | Returns: the address of the endpoint this Connection is connected to, or null if it is unconnected.Implements org. Returns the address of the endpoint this Connection is connected to, or null if it is unconnected. |
| public int | getReadBufferSize()
Implements org. Get the default size of |
| public int | getWriteBufferSize()
Implements org. Get the default size of |
| public boolean | |
| public void | join(final InetAddress
The multicast address to join group, final NetworkInterface The network interface on which to join the group networkInterface)Joins a multicast group to begin receiving all datagrams sent to the group. |
| public void | join(final InetAddress
The multicast address to join group, final NetworkInterface The network interface on which to join the group networkInterface, final InetAddress The source address source)Joins a multicast group to begin receiving datagrams sent to the group from a given source address. |
| public void | notifyCanWrite(final WriteHandler writeHandler)
Implements org. Instructs the |
| public void | notifyCanWrite(WriteHandler handler, int length)
Implements org.
Deprecated
Instructs the |
| protected boolean | |
| protected final void | |
| protected final void | |
| protected final void | |
| protected final void | |
| pack-priv void | setMonitoringProbes(final ConnectionProbe[] monitoringProbes)
Hides org. Set the monitoringProbes array directly. |
| public void | setReadBufferSize(final int readBufferSize)
Implements org. Set the default size of |
| protected void | setSelectionKey(SelectionKey selectionKey)
Overrides org.
|
| protected void | setSelectorRunner(SelectorRunner selectorRunner)
Overrides org.
|
| public void | setWriteBufferSize(int writeBufferSize)
Implements org. Set the default size of |
| public String | |
| public void | unblock(final InetAddress
The multicast address to join group, final NetworkInterface The network interface on which to join the group networkInterface, final InetAddress The source address to block source)Unblocks multicast datagrams from the given source address. |
| localSocketAddressHolder | back to summary |
|---|---|
| pack-priv Holder<SocketAddress> localSocketAddressHolder | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| membershipKeysMap | back to summary |
|---|---|
| private Map<InetAddress, Set<MembershipKey>> membershipKeysMap | |
| multicastSync | back to summary |
|---|---|
| private final Object multicastSync | |
| peerSocketAddressHolder | back to summary |
|---|---|
| pack-priv Holder<SocketAddress> peerSocketAddressHolder | |
| readBufferSize | back to summary |
|---|---|
| private int readBufferSize | |
| writeBufferSize | back to summary |
|---|---|
| private int writeBufferSize | |
| UDPNIOConnection | back to summary |
|---|---|
| public UDPNIOConnection(UDPNIOTransport transport, DatagramChannel channel) | |
| block | back to summary |
|---|---|
| public void block(final InetAddress group, final NetworkInterface networkInterface, final InetAddress source) throws IOException Blocks multicast datagrams from the given source address. If this connection has non-source specific membership in the group on the given interface then this method blocks multicast datagrams from the given source address. If the given source address is already blocked then this method has no effect.
| |
| canWrite | back to summary |
|---|---|
| public boolean canWrite() Implements org.
| |
| canWrite | back to summary |
|---|---|
| public boolean canWrite(int length) Implements org. Deprecated
| |
| drop | back to summary |
|---|---|
| public void drop(final InetAddress group, final NetworkInterface networkInterface) throws IOException Drops non-source specific membership in a multicast group. If this connection doesn't have non-source specific membership in the group on the given interface to receive datagrams then this method call has no effect. Otherwise this connection drops the group membership.
| |
| drop | back to summary |
|---|---|
| public void drop(final InetAddress group, final NetworkInterface networkInterface, final InetAddress source) throws IOException Drops membership in a multicast group. If the source parameter is null - this method call is equivalent to
| |
| dropAll | back to summary |
|---|---|
| public void dropAll(final InetAddress group, final NetworkInterface networkInterface) throws IOException Drops all active membership in a multicast group. If this connection doesn't have any type of membership in the group on the given interface to receive datagrams then this method call has no effect. Otherwise this connection drops all types of the group membership.
| |
| enableInitialOpRead | back to summary |
|---|---|
| protected void enableInitialOpRead() throws IOException Overrides org. Doc from org. Enables OP_READ if it has never been enabled before.
| |
| getLocalAddress | back to summary |
|---|---|
| public SocketAddress getLocalAddress() Implements org. Returns the local address of this Connection, or null if it is unconnected.
| |
| getPeerAddress | back to summary |
|---|---|
| public SocketAddress getPeerAddress() Implements org. Returns the address of the endpoint this Connection is connected to, or null if it is unconnected.
| |
| getReadBufferSize | back to summary |
|---|---|
| public int getReadBufferSize() Implements org. Doc from org. Get the default size of
| |
| getWriteBufferSize | back to summary |
|---|---|
| public int getWriteBufferSize() Implements org. Doc from org. Get the default size of
| |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() | |
| join | back to summary |
|---|---|
| public void join(final InetAddress group, final NetworkInterface networkInterface) throws IOException Joins a multicast group to begin receiving all datagrams sent to the group. If this connection is currently a member of the group on the given interface to receive all datagrams then this method call has no effect. Otherwise this connection joins the requested group and channel's membership in not source-specific. A multicast connection may join several multicast groups, including the same group on more than one interface. An implementation may impose a limit on the number of groups that may be joined at the same time.
| |
| join | back to summary |
|---|---|
| public void join(final InetAddress group, final NetworkInterface networkInterface, final InetAddress source) throws IOException Joins a multicast group to begin receiving datagrams sent to the group from a given source address. If this connection is currently a member of the group on the given interface to receive datagrams from the given source address then this method call has no effect. Otherwise this connection joins the group and depending on the source parameter value (whether it's not null or null value) the connection's membership is or is not source-specific. Membership is cumulative and this method may be invoked again with the same group and interface to allow receiving datagrams sent by other source addresses to the group.
| |
| notifyCanWrite | back to summary |
|---|---|
| public void notifyCanWrite(final WriteHandler writeHandler) Implements org. Doc from org. Instructs the
| |
| notifyCanWrite | back to summary |
|---|---|
| public void notifyCanWrite(WriteHandler handler, int length) Implements org. Doc from org. Deprecated
Instructs the
| |
| notifyReady | back to summary |
|---|---|
| protected boolean notifyReady() | |
| onConnect | back to summary |
|---|---|
| protected final void onConnect() throws IOException Method will be called, when the connection gets connected. | |
| onRead | back to summary |
|---|---|
| protected final void onRead(Buffer data, int size) Method will be called, when some data was read on the connection | |
| onWrite | back to summary |
|---|---|
| protected final void onWrite(Buffer data, int size) Method will be called, when some data was written on the connection | |
| resetProperties | back to summary |
|---|---|
| protected final void resetProperties() | |
| setMonitoringProbes | back to summary |
|---|---|
| pack-priv void setMonitoringProbes(final ConnectionProbe[] monitoringProbes) Hides org. Set the monitoringProbes array directly. | |
| setReadBufferSize | back to summary |
|---|---|
| public void setReadBufferSize(final int readBufferSize) Implements org. Doc from org. Set the default size of
| |
| setSelectionKey | back to summary |
|---|---|
| protected void setSelectionKey(SelectionKey selectionKey) Overrides org.
| |
| setSelectorRunner | back to summary |
|---|---|
| protected void setSelectorRunner(SelectorRunner selectorRunner) Overrides org.
| |
| setWriteBufferSize | back to summary |
|---|---|
| public void setWriteBufferSize(int writeBufferSize) Implements org. Doc from org. Set the default size of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| unblock | back to summary |
|---|---|
| public void unblock(final InetAddress group, final NetworkInterface networkInterface, final InetAddress source) throws IOException Unblocks multicast datagrams from the given source address.
If this connection has non-source specific membership in the group on the given interface and specified source
address was previously blocked using
| |