net.grinder.communication
Class SocketAcceptorThread

java.lang.Object
  extended by java.lang.Thread
      extended by net.grinder.communication.SocketAcceptorThread
All Implemented Interfaces:
Runnable

public final class SocketAcceptorThread
extends Thread

Active acceptor that accepts a single connection.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 void close()
           
static SocketAcceptorThread create()
           
 Socket getAcceptedSocket()
           
 String getHostName()
           
 int getPort()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static SocketAcceptorThread create()
                                   throws Exception
Throws:
Exception

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getHostName

public String getHostName()
                   throws UnknownHostException
Throws:
UnknownHostException

getPort

public int getPort()

getAcceptedSocket

public Socket getAcceptedSocket()

close

public final void close()
                 throws Exception
Throws:
Exception


Copyright © 2000-2013. All Rights Reserved.