public class IIOPListener.Acceptor extends ListenerBase.Acceptor
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected String |
info |
protected boolean |
reuseAddress |
protected ServerSocket |
serverSocket |
protected int |
soTimeout |
protected boolean |
terminated |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier | Constructor and Description |
---|---|
protected |
IIOPListener.Acceptor(String name) |
protected |
IIOPListener.Acceptor(String name,
IIOPAddress target) |
Modifier and Type | Method and Description |
---|---|
protected void |
beginAccept()
template method that is invoked during the accept loop
before an incoming connection is accepted.
|
protected ServerSocket |
createServerSocket() |
protected ServerSocket |
createServerSocket(InetAddress host,
int port) |
protected void |
deliverConnection(Socket socket) |
protected void |
doHandleExceptionInRunLoop(Exception exception,
boolean isTerminated) |
protected void |
doSetup(Socket socket) |
protected void |
endAccept()
template method that is invoked during the accept loop
after an incoming connection was processed.
|
boolean |
getAcceptorSocketLoop()
getAcceptorSocketLoop returns whether we have done
a socket accept. |
IIOPAddress |
getLocalAddress() |
protected ServerSocketFactory |
getServerSocketFactory() |
void |
init() |
void |
run() |
void |
runLoop() |
protected void |
setup(Socket socket)
Template method that sets up the socket right after the
connection has been established.
|
void |
terminate()
Terminates this Acceptor by closing the ServerSocket and interrupting
the run loop.
|
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
protected final int soTimeout
protected final boolean reuseAddress
protected ServerSocket serverSocket
protected String info
protected boolean terminated
protected IIOPListener.Acceptor(String name, IIOPAddress target) throws ConfigurationException
ConfigurationException
protected IIOPListener.Acceptor(String name) throws ConfigurationException
ConfigurationException
public void init()
init
in class ListenerBase.Acceptor
protected void beginAccept() throws InterruptedException
InterruptedException
protected void endAccept()
public final void run()
run
in interface Runnable
run
in class ListenerBase.Acceptor
public final void runLoop()
protected void doHandleExceptionInRunLoop(Exception exception, boolean isTerminated)
public void terminate()
terminate
in class ListenerBase.Acceptor
public IIOPAddress getLocalAddress()
protected ServerSocket createServerSocket()
protected ServerSocket createServerSocket(InetAddress host, int port)
protected ServerSocketFactory getServerSocketFactory()
protected final void setup(Socket socket) throws IOException
IOException
protected void doSetup(Socket socket)
protected void deliverConnection(Socket socket)
public boolean getAcceptorSocketLoop()
getAcceptorSocketLoop
returns whether we have done
a socket accept. This is useful for the AcceptorExceptionListener
so it can determine for instance if the SSLException has been
thrown before any connections have been made or after x amount of
connections - this allows differentiation between initial
configuration failure and failure to connect to a single client.boolean
valueCopyright © 2017 JacORB. All rights reserved.