LimeWire Consolidated API

org.limewire.net
Class AsyncConnectionDispatcher

java.lang.Object
  extended by org.limewire.nio.channel.AbstractChannelInterestReader
      extended by org.limewire.net.AsyncConnectionDispatcher
All Implemented Interfaces:
Closeable, Channel, ReadableByteChannel, ScatteringByteChannel, ChannelReader, ChannelReadObserver, InterestReadableByteChannel, InterestScatteringByteChannel, IOErrorObserver, ReadObserver, Shutdownable

public class AsyncConnectionDispatcher
extends AbstractChannelInterestReader

A ConnectionDispatcher that reads asynchronously from the socket.


Field Summary
 
Fields inherited from class org.limewire.nio.channel.AbstractChannelInterestReader
buffer, shutdown, source
 
Constructor Summary
AsyncConnectionDispatcher(ConnectionDispatcher dispatcher, Socket socket, String allowedWord, boolean allowTLS)
           
 
Method Summary
 void handleRead()
          Notification that a read can be performed.
 int read(ByteBuffer dst)
           
 long read(ByteBuffer[] dst)
           
 long read(ByteBuffer[] dst, int offset, int length)
           
 
Methods inherited from class org.limewire.nio.channel.AbstractChannelInterestReader
close, getReadChannel, handleIOException, interestRead, isOpen, setReadChannel, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncConnectionDispatcher

public AsyncConnectionDispatcher(ConnectionDispatcher dispatcher,
                                 Socket socket,
                                 String allowedWord,
                                 boolean allowTLS)
Method Detail

handleRead

public void handleRead()
                throws IOException
Description copied from interface: ReadObserver
Notification that a read can be performed.

Throws:
IOException

read

public int read(ByteBuffer dst)
Specified by:
read in interface ReadableByteChannel
Overrides:
read in class AbstractChannelInterestReader

read

public long read(ByteBuffer[] dst)
Specified by:
read in interface ScatteringByteChannel
Overrides:
read in class AbstractChannelInterestReader

read

public long read(ByteBuffer[] dst,
                 int offset,
                 int length)
Specified by:
read in interface ScatteringByteChannel
Overrides:
read in class AbstractChannelInterestReader

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.