com.opera.core.systems.util
Class SocketMonitor
java.lang.Object
com.opera.core.systems.util.SocketMonitor
public class SocketMonitor
- extends java.lang.Object
This will monitor any selectable channel, such as a SocketChannel or
ServerSocketChannel and fire canWrite() or canRead() events when such events
are detected by poll().
- Author:
- Jan Vidar Krey (janv@opera.com)
| 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(java.nio.channels.SelectableChannel channel,
SocketListener listener,
int selectMask)
modify
public boolean modify(java.nio.channels.SelectableChannel channel,
SocketListener listener,
int selectMask)
remove
public void remove(java.nio.channels.SelectableChannel channel)
stop
public void stop()
poll
public boolean poll()
poll
public boolean poll(long ms)
pollSockets
protected boolean pollSockets(long ms)
applyChanges
protected void applyChanges()
processSelectionKey
protected void processSelectionKey(java.nio.channels.SelectionKey key)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2011. All Rights Reserved.