org.jacorb.orb.etf

Class ListenerBase

public abstract class ListenerBase extends _ListenerLocalBase implements Configurable

Version: $Id: ListenerBase.java,v 1.4 2006/06/26 08:09:30 alphonse.bendt Exp $

Author: Andre Spiegel

Nested Class Summary
protected abstract classListenerBase.Acceptor
Field Summary
protected ListenerBase.Acceptoracceptor
The primary acceptor of this listener.
protected Configurationconfiguration
The configuration.
protected Loggerlogger
The logger.
protected ORBorb
The ORB.
protected Profileprofile
The profile of this listener's endpoint.
protected Handleup
Reference to the ORB, for delivering incoming connections via upcalls.
Method Summary
Connectionaccept()
This call is an alternative to using set_handle() to initiate the callback-style of accepting new connections.
voidcompleted_data(Connection conn)
The connection instance is returned to the Listener.
voidconfigure(Configuration config)
protected voiddeliverConnection(Connection connection)
Method the Acceptor implementation should call to pass an opened connection to the ORB.
voiddestroy()
The Listener is instructed to close its endpoint.
Profileendpoint()
Returns a copy of the profile describing the endpoint of this instance.
voidlisten()
It is possible that connection requests arrive after the initial creation of the Listener instance but before the conclusion of the configuration of the specific endpoint in this plugin.
voidset_handle(Handle up)
This call establishes the link between the ORB (i.e. the Handle instance) and a server endpoint of the plugged-in transport.

Field Detail

acceptor

protected ListenerBase.Acceptor acceptor
The primary acceptor of this listener.

configuration

protected Configuration configuration
The configuration.

logger

protected Logger logger
The logger.

orb

protected ORB orb
The ORB.

profile

protected Profile profile
The profile of this listener's endpoint.

up

protected Handle up
Reference to the ORB, for delivering incoming connections via upcalls.

Method Detail

accept

public Connection accept()
This call is an alternative to using set_handle() to initiate the callback-style of accepting new connections. This call blocks until a client connects to the server. Then a new Connection instance is returned. The transport plug-in must ensure that a thread blocked in accept() returns when destroy() is called with a null object reference. The transport plug-in must raise the CORBA::BAD_INV_ORDER with minor code {TBD} if the ORB calls this operation and set_handle() has ever been called previously on the same listener instance.

completed_data

public void completed_data(Connection conn)
The connection instance is returned to the Listener. It now shall signal any incoming data to the Handle.

configure

public void configure(Configuration config)

deliverConnection

protected void deliverConnection(Connection connection)
Method the Acceptor implementation should call to pass an opened connection to the ORB.

destroy

public void destroy()
The Listener is instructed to close its endpoint. It shall no longer accept any connection requests and shall close all connections opened by it.

endpoint

public Profile endpoint()
Returns a copy of the profile describing the endpoint of this instance.

listen

public void listen()
It is possible that connection requests arrive after the initial creation of the Listener instance but before the conclusion of the configuration of the specific endpoint in this plugin. In order to provide a clear end of this configuration state, we added the listen() method. It is called by the ORB when it ready for incoming connection and thus signals the Listener instance to start processing the incoming connection requests. Therefore, a Listener instance shall not deliver incoming connections to the ORB before this method was called.

set_handle

public void set_handle(Handle up)
This call establishes the link between the ORB (i.e. the Handle instance) and a server endpoint of the plugged-in transport. All calls upwards into the ORB shall use the given instance.