org.jacorb.orb
Class BasicAdapter

java.lang.Object
  extended by org.omg.CORBA.LocalObject
      extended by org.omg.ETF._HandleLocalBase
          extended by org.jacorb.orb.BasicAdapter
All Implemented Interfaces:
java.io.Serializable, org.jacorb.config.Configurable, LocalInterface, Object, IDLEntity, Handle, HandleOperations

public class BasicAdapter
extends _HandleLocalBase
implements org.jacorb.config.Configurable

Class BasicAdapter, used by the POA.

Version:
$Id: BasicAdapter.java,v 1.61 2009-05-03 21:35:54 andre.spiegel Exp $
Author:
Gerald Brose
See Also:
Serialized Form

Method Summary
 boolean add_input(Connection conn)
          Announces a new connection instance to the ORB.
 void closed_by_peer(Connection conn)
          In some cases, the client side can initiate the closing of a connection.
 void configure(org.jacorb.config.Configuration myConfiguration)
          configure the BasicAdapter
 void deliverRequest(ServerRequest request, POA poa)
          to be called from the POA, code duplicated for performance reasons to avoid synchronization in the private version of this method.
 java.lang.String getAddress()
          Deprecated. This method cannot return a sensible result in the presence of alternate transports, use getEndpointProfiles() instead.
 java.util.List getEndpointProfiles()
          Returns a List of endpoint profiles for all transports that listen for incoming connections.
 ORB getORB()
           
 int getPort()
          Deprecated. This method cannot return a sensible result in the presence of alternate transports, use getEndpointProfiles() instead.
 RequestListener getRequestListener()
           
 int getSSLPort()
          Deprecated. This method cannot return a sensible result in the presence of alternate transports, use getEndpointProfiles() instead.
 boolean hasSSLListener()
          Deprecated. This method cannot return a sensible result in the presence of alternate transports, use getEndpointProfiles() instead.
 void renewSSLServerSockets()
          Tell all IIOPListeners to renew their SSL server sockets.
 void return_result(ServerRequest request)
          to be called from the POA
 void signal_data_available(Connection conn)
          The plugged-in transport (e.g.
 void stopListeners()
           
 
Methods inherited from class org.omg.ETF._HandleLocalBase
_ids
 
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_component, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_component, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Method Detail

configure

public void configure(org.jacorb.config.Configuration myConfiguration)
               throws org.jacorb.config.ConfigurationException
configure the BasicAdapter

Specified by:
configure in interface org.jacorb.config.Configurable
Throws:
org.jacorb.config.ConfigurationException

getRequestListener

public RequestListener getRequestListener()

getEndpointProfiles

public java.util.List getEndpointProfiles()
Returns a List of endpoint profiles for all transports that listen for incoming connections. Each individual profile is a copy and can safely be modified by the caller (e.g. add an object key, patch the address, stuff it into an IOR, etc.).


getPort

public int getPort()
Deprecated. This method cannot return a sensible result in the presence of alternate transports, use getEndpointProfiles() instead.


getSSLPort

public int getSSLPort()
Deprecated. This method cannot return a sensible result in the presence of alternate transports, use getEndpointProfiles() instead.


hasSSLListener

public boolean hasSSLListener()
Deprecated. This method cannot return a sensible result in the presence of alternate transports, use getEndpointProfiles() instead.


getAddress

public java.lang.String getAddress()
Deprecated. This method cannot return a sensible result in the presence of alternate transports, use getEndpointProfiles() instead.


deliverRequest

public void deliverRequest(ServerRequest request,
                           POA poa)
to be called from the POA, code duplicated for performance reasons to avoid synchronization in the private version of this method.


return_result

public void return_result(ServerRequest request)
to be called from the POA


stopListeners

public void stopListeners()

renewSSLServerSockets

public void renewSSLServerSockets()
Tell all IIOPListeners to renew their SSL server sockets.

See Also:
IIOPListener.renewSSLServerSocket()

add_input

public boolean add_input(Connection conn)
Announces a new connection instance to the ORB. The caller shall examine the boolean return value and destroy the connection, if the call returns false. A new connection initially belongs to the plug-in, and it shall signal the connection to the ORB when the first incoming request data was received, using this Handle upcall.

The Handle shall accept the connection (and cache information about it if needed), as long as it is allowed to do so by the ORB. In this case it shall return true. If a new connection is currently not allowed, it shall ignore the passed instance and return false.

Specified by:
add_input in interface HandleOperations

closed_by_peer

public void closed_by_peer(Connection conn)
In some cases, the client side can initiate the closing of a connection. The plugin shall signal this event to the server side ORB via its Handle by calling this function.

Specified by:
closed_by_peer in interface HandleOperations

signal_data_available

public void signal_data_available(Connection conn)
The plugged-in transport (e.g. the Listener instance) shall call this function when it owns a server-side Connection and data arrives on the local endpoint. This will start a new request dispatching cycle in the ORB. Subsequently, it shall ignore any other incoming data from this Connection until the Listener's completed_data function is called by the ORB.

Specified by:
signal_data_available in interface HandleOperations

getORB

public ORB getORB()