Class VirtualChannelSelector
java.lang.Object
com.biglybt.core.networkmanager.VirtualAbstractChannelSelector
com.biglybt.core.networkmanager.VirtualChannelSelector
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfaceListener for notification upon socket channel selection. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanstatic final intstatic final intstatic final intstatic final intprivate booleanFields inherited from class VirtualAbstractChannelSelector
op -
Constructor Summary
ConstructorsConstructorDescriptionVirtualChannelSelector(String name, int interest_op, boolean pause_after_select) Create a new virtual selectable-channel selector, selecting over the given interest-op. -
Method Summary
Modifier and TypeMethodDescriptionvoidregister(ServerSocketChannel channel, VirtualChannelSelector.VirtualAcceptSelectorListener listener, Object attachment) voidregister(SocketChannel channel, VirtualChannelSelector.VirtualSelectorListener listener, Object attachment) voidselectFailure(VirtualChannelSelector.VirtualAbstractSelectorListener listener, AbstractSelectableChannel sc, Object attachment, Throwable msg) booleanselectSuccess(VirtualChannelSelector.VirtualAbstractSelectorListener listener, AbstractSelectableChannel sc, Object attachment) Methods inherited from class VirtualAbstractChannelSelector
cancel, destroy, getName, isDestroyed, isPaused, isRegistered, pauseSelects, register, register, registerSupport, resumeSelects, select, setRandomiseKeys
-
Field Details
-
OP_ACCEPT
public static final int OP_ACCEPT- See Also:
-
OP_CONNECT
public static final int OP_CONNECT- See Also:
-
OP_READ
public static final int OP_READ- See Also:
-
OP_WRITE
public static final int OP_WRITE- See Also:
-
destroyed
private volatile boolean destroyed -
randomise_keys
private boolean randomise_keys
-
-
Constructor Details
-
VirtualChannelSelector
Create a new virtual selectable-channel selector, selecting over the given interest-op.- Parameters:
interest_op- operation set of OP_CONNECT, OP_ACCEPT, OP_READ, or OP_WRITEpause_after_select- whether or not to auto-disable interest op after select
-
-
Method Details
-
register
public void register(SocketChannel channel, VirtualChannelSelector.VirtualSelectorListener listener, Object attachment) -
register
public void register(ServerSocketChannel channel, VirtualChannelSelector.VirtualAcceptSelectorListener listener, Object attachment) -
selectSuccess
public boolean selectSuccess(VirtualChannelSelector.VirtualAbstractSelectorListener listener, AbstractSelectableChannel sc, Object attachment) - Overrides:
selectSuccessin classVirtualAbstractChannelSelector
-
selectFailure
public void selectFailure(VirtualChannelSelector.VirtualAbstractSelectorListener listener, AbstractSelectableChannel sc, Object attachment, Throwable msg) - Overrides:
selectFailurein classVirtualAbstractChannelSelector
-