|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.nio.channels.Selector
java.nio.channels.spi.AbstractSelector
org.limewire.rudp.UDPMultiplexor
public class UDPMultiplexor
Manages the assignment of connection IDs and the routing of
RUDPMessages.
| Field Summary | |
|---|---|
static byte |
UNASSIGNED_SLOT
The 0 slot is for incoming new connections so it is not assigned |
| Method Summary | |
|---|---|
protected void |
implCloseSelector()
|
boolean |
isConnectedTo(InetAddress host)
Determines if we're connected to the given host. |
Set<SelectionKey> |
keys()
Returns all SelectionKeys this Selector is currently in control of. |
protected SelectionKey |
register(AbstractSelectableChannel ch,
int ops,
Object att)
Registers a new channel with this Selector. |
void |
routeMessage(RUDPMessage msg,
InetSocketAddress addr)
Route a message to the UDPConnectionProcessor identified via the message's
connection ID. |
int |
select()
|
int |
select(long timeout)
|
Set<SelectionKey> |
selectedKeys()
|
int |
selectNow()
Polls through all available channels and returns those that are ready. |
Selector |
wakeup()
|
| Methods inherited from class java.nio.channels.spi.AbstractSelector |
|---|
begin, cancelledKeys, close, deregister, end, isOpen, provider |
| Methods inherited from class java.nio.channels.Selector |
|---|
open |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte UNASSIGNED_SLOT
| Method Detail |
|---|
public boolean isConnectedTo(InetAddress host)
public void routeMessage(RUDPMessage msg,
InetSocketAddress addr)
UDPConnectionProcessor identified via the message's
connection ID.
Notifies the provided listener (if any) if the channel is ready to produce events.
protected void implCloseSelector()
throws IOException
implCloseSelector in class AbstractSelectorIOException
protected SelectionKey register(AbstractSelectableChannel ch,
int ops,
Object att)
register in class AbstractSelectorpublic Set<SelectionKey> keys()
SelectionKeys this Selector is currently in control of.
keys in class Selector
public int select()
throws IOException
select in class SelectorIOException
public int select(long timeout)
throws IOException
select in class SelectorIOExceptionpublic Set<SelectionKey> selectedKeys()
selectedKeys in class Selector
public int selectNow()
throws IOException
selectNow in class SelectorIOExceptionpublic Selector wakeup()
wakeup in class Selector
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||