Class MCGroupImpl.SelectorListener
java.lang.Object
com.biglybt.net.udp.mc.impl.MCGroupImpl.SelectorListener
- All Implemented Interfaces:
VirtualAbstractChannelSelector.VirtualSelectorListener, VirtualChannelSelector.VirtualAbstractSelectorListener
- Enclosing class:
MCGroupImpl
class MCGroupImpl.SelectorListener
extends Object
implements VirtualAbstractChannelSelector.VirtualSelectorListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DatagramChannel(package private) longprivate final InetAddressprivate final booleanprivate final NetworkInterface(package private) long -
Constructor Summary
ConstructorsConstructorDescriptionSelectorListener(NetworkInterface _network_interface, InetAddress _local_address, DatagramChannel _channel, boolean _log_on_stop) -
Method Summary
Modifier and TypeMethodDescriptionvoidselectFailure(VirtualAbstractChannelSelector selector, AbstractSelectableChannel sc, Object attachment, Throwable msg) Called when a channel selection fails.booleanselectSuccess(VirtualAbstractChannelSelector selector, AbstractSelectableChannel sc, Object attachment) Called when a channel is successfully selected for readyness.
-
Field Details
-
network_interface
-
local_address
-
channel
-
log_on_stop
private final boolean log_on_stop -
successful_accepts
long successful_accepts -
failed_accepts
long failed_accepts
-
-
Constructor Details
-
SelectorListener
SelectorListener(NetworkInterface _network_interface, InetAddress _local_address, DatagramChannel _channel, boolean _log_on_stop)
-
-
Method Details
-
selectSuccess
public boolean selectSuccess(VirtualAbstractChannelSelector selector, AbstractSelectableChannel sc, Object attachment) Description copied from interface:VirtualAbstractChannelSelector.VirtualSelectorListenerCalled when a channel is successfully selected for readyness.- Specified by:
selectSuccessin interfaceVirtualAbstractChannelSelector.VirtualSelectorListener- Parameters:
attachment- originally given with the channel's registration- Returns:
- indicator of whether or not any 'progress' was made due to this select null -> progress made, String -> location of non progress e.g. read-select -> read >0 bytes, write-select -> wrote > 0 bytes
-
selectFailure
public void selectFailure(VirtualAbstractChannelSelector selector, AbstractSelectableChannel sc, Object attachment, Throwable msg) Description copied from interface:VirtualAbstractChannelSelector.VirtualSelectorListenerCalled when a channel selection fails.- Specified by:
selectFailurein interfaceVirtualAbstractChannelSelector.VirtualSelectorListener- Parameters:
msg- failure message
-