org.smallmind.plumber.io
Class ServerSocketHerald

java.lang.Object
  extended by org.smallmind.plumber.io.ServerSocketHerald
All Implemented Interfaces:
Runnable, ComponentFactory<SocketWorker>

public class ServerSocketHerald
extends Object
implements ComponentFactory<SocketWorker>, Runnable


Field Summary
static int NO_THROTTLE
           
 
Constructor Summary
ServerSocketHerald(Logger logger, SocketWorkerFactory workerFactory, ServerSocket serverSocket, int maxAccepted, int poolSize)
           
 
Method Summary
 SocketWorker createComponent()
           
 void finish()
           
 void returnConnection(SocketWorker 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

ServerSocketHerald

public ServerSocketHerald(Logger logger,
                          SocketWorkerFactory workerFactory,
                          ServerSocket serverSocket,
                          int maxAccepted,
                          int poolSize)
                   throws IOException
Throws:
IOException
Method Detail

createComponent

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

finish

public void finish()
            throws InterruptedException
Throws:
InterruptedException

run

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

returnConnection

public void returnConnection(SocketWorker worker)


Copyright © 2012. All Rights Reserved.