org.smallmind.plumber.nio
Class ServerSocketChannelHerald

java.lang.Object
  extended by org.smallmind.plumber.nio.ServerSocketChannelHerald
All Implemented Interfaces:
Runnable, ComponentFactory<SocketChannelWorker>

public class ServerSocketChannelHerald
extends Object
implements ComponentFactory<SocketChannelWorker>, Runnable


Field Summary
static int NO_THROTTLE
           
 
Constructor Summary
ServerSocketChannelHerald(Logger logger, SocketChannelWorkerFactory workerFactory, ServerSocketChannel serverSocketChannel, int maxAccepted, int poolSize)
           
 
Method Summary
 SocketChannelWorker createComponent()
           
 void finish()
           
 void returnConnection(SocketChannelWorker worker)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_THROTTLE

public static final int NO_THROTTLE
See Also:
Constant Field Values
Constructor Detail

ServerSocketChannelHerald

public ServerSocketChannelHerald(Logger logger,
                                 SocketChannelWorkerFactory workerFactory,
                                 ServerSocketChannel serverSocketChannel,
                                 int maxAccepted,
                                 int poolSize)
                          throws IOException
Throws:
IOException
Method Detail

createComponent

public SocketChannelWorker createComponent()
                                    throws Exception
Specified by:
createComponent in interface ComponentFactory<SocketChannelWorker>
Throws:
Exception

finish

public void finish()
            throws InterruptedException
Throws:
InterruptedException

run

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

returnConnection

public void returnConnection(SocketChannelWorker worker)


Copyright © 2012. All Rights Reserved.