org.jacorb.orb.iiop

Class IIOPListener.Acceptor

public class IIOPListener.Acceptor extends ListenerBase.Acceptor

Field Summary
protected ServerSocketserverSocket
protected booleanterminated
Constructor Summary
protected Acceptor(String name)
Method Summary
protected voidbeginAccept()
template method that is invoked during the accept loop before an incoming connection is accepted.
protected ServerSocketcreateServerSocket()
Template method that creates the server socket.
protected voiddeliverConnection(Socket socket)
protected voiddoHandleExceptionInRunLoop(Exception exception, boolean isTerminated)
protected voiddoSetup(Socket socket)
protected voidendAccept()
template method that is invoked during the accept loop after an incoming connection was processed.
booleangetAcceptorSocketLoop()
getAcceptorSocketLoop returns whether we have done a socket accept.
IIOPAddressgetLocalAddress()
voidinit()
voidrun()
protected voidsetup(Socket socket)
Template method that sets up the socket right after the connection has been established.
voidterminate()
Terminates this Acceptor by closing the ServerSocket and interrupting the run loop.

Field Detail

serverSocket

protected ServerSocket serverSocket

terminated

protected boolean terminated

Constructor Detail

Acceptor

protected Acceptor(String name)

Method Detail

beginAccept

protected void beginAccept()
template method that is invoked during the accept loop before an incoming connection is accepted.

createServerSocket

protected ServerSocket createServerSocket()
Template method that creates the server socket.

deliverConnection

protected void deliverConnection(Socket socket)

doHandleExceptionInRunLoop

protected void doHandleExceptionInRunLoop(Exception exception, boolean isTerminated)

doSetup

protected void doSetup(Socket socket)

endAccept

protected void endAccept()
template method that is invoked during the accept loop after an incoming connection was processed.

getAcceptorSocketLoop

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.

Returns: a boolean value

getLocalAddress

public IIOPAddress getLocalAddress()

init

public void init()

run

public final void run()

setup

protected final void setup(Socket socket)
Template method that sets up the socket right after the connection has been established. Subclass implementations may implement their own logic by overriding doSetup

terminate

public void terminate()
Terminates this Acceptor by closing the ServerSocket and interrupting the run loop.