rabbit.httpio
Class Acceptor

java.lang.Object
  extended by rabbit.httpio.Acceptor
All Implemented Interfaces:
Runnable, SocketHandler

public class Acceptor
extends Object
implements SocketHandler

A standard acceptor.

Author:
Robert Olofsson

Constructor Summary
Acceptor(ServerSocketChannel ssc, SelectorRunner selectorRunner, Logger logger, AcceptorListener listener)
           
 
Method Summary
 String getDescription()
          Get a string description.
 void register()
           
 void run()
           
 void timeout()
          Signal that the select operation timed out.
 boolean useSeparateThread()
          Check if this handler needs to run in a separate thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Acceptor

public Acceptor(ServerSocketChannel ssc,
                SelectorRunner selectorRunner,
                Logger logger,
                AcceptorListener listener)
Method Detail

getDescription

public String getDescription()
Description copied from interface: SocketHandler
Get a string description.

Specified by:
getDescription in interface SocketHandler

useSeparateThread

public boolean useSeparateThread()
Description copied from interface: SocketHandler
Check if this handler needs to run in a separate thread.

Specified by:
useSeparateThread in interface SocketHandler

timeout

public void timeout()
Description copied from interface: SocketHandler
Signal that the select operation timed out.

Specified by:
timeout in interface SocketHandler

run

public void run()
Specified by:
run in interface Runnable

register

public void register()
              throws IOException
Throws:
IOException