com.aelitis.azureus.core.networkmanager.impl.tcp
Class VirtualChannelSelectorImpl
java.lang.Object
com.aelitis.azureus.core.networkmanager.impl.tcp.VirtualChannelSelectorImpl
public class VirtualChannelSelectorImpl
- extends Object
Provides a simplified and safe (selectable-channel) socket single-op selector.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
selector
protected Selector selector
parent
protected final VirtualChannelSelector parent
VirtualChannelSelectorImpl
public VirtualChannelSelectorImpl(VirtualChannelSelector _parent,
int _interest_op,
boolean _pause_after_select,
boolean _randomise_keys)
openNewSelector
protected Selector openNewSelector()
setRandomiseKeys
public void setRandomiseKeys(boolean r)
pauseSelects
public void pauseSelects(AbstractSelectableChannel channel)
resumeSelects
public void resumeSelects(AbstractSelectableChannel channel)
cancel
public void cancel(AbstractSelectableChannel channel)
register
public void register(AbstractSelectableChannel channel,
VirtualChannelSelector.VirtualAbstractSelectorListener listener,
Object attachment)
select
public int select(long timeout)
destroy
public void destroy()
- Note that you have to ensure that a select operation is performed on the normal select
loop *after* destroying the selector to actually cause the destroy to occur
closeExistingSelector
protected void closeExistingSelector()