com.opera.core.systems.util
Class SocketMonitor
java.lang.Object
com.opera.core.systems.util.SocketMonitor
public class SocketMonitor
- extends Object
This will monitor any selectable channel, such as a SocketChannel or
ServerSocketChannel and fire SocketListener.canWrite(java.nio.channels.SelectableChannel)
or SocketListener.canRead(java.nio.channels.SelectableChannel) events when such events
are detected by poll().
- Author:
- Jan Vidar Krey
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketMonitor
public SocketMonitor()
add
public boolean add(SelectableChannel channel,
SocketListener listener,
int selectMask)
modify
public boolean modify(SelectableChannel channel,
SocketListener listener,
int selectMask)
remove
public void remove(SelectableChannel channel)
stop
public void stop()
poll
public boolean poll()
poll
public boolean poll(long ms)
processSelectionKey
protected void processSelectionKey(SelectionKey key)
throws IOException
- Throws:
IOException
Copyright © 2012. All Rights Reserved.