alma::acs::component::dynwrapper::DynamicProxyFactory Class Reference

Collaboration diagram for alma::acs::component::dynwrapper::DynamicProxyFactory:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Object createServerProxy (Class<?extends ACSComponentOperations > corbaIF, ComponentLifecycle componentImpl, Class<?> componentIF) throws DynWrapperException

Static Public Member Functions

static DynamicProxyFactory getDynamicProxyFactory (Logger logger)

Package Functions

public< T > T createClientProxy (Class< T > componentInterface, org.omg.CORBA.Object corbaStub, Class<?> corbaOperationsIF) throws DynWrapperException

Private Member Functions

 DynamicProxyFactory (Logger logger)
boolean checkMethodMatching (Class facade, ComponentInvocationHandler invHandler) throws DynWrapperException

Private Attributes

Logger m_logger = null

Static Private Attributes

static DynamicProxyFactory s_instance

Detailed Description

Author:
hsommer Nov 22, 2002 4:48:25 PM $Id$

Constructor & Destructor Documentation

alma::acs::component::dynwrapper::DynamicProxyFactory::DynamicProxyFactory ( Logger  logger  )  [inline, private]

References m_logger.

Referenced by getDynamicProxyFactory().


Member Function Documentation

boolean alma::acs::component::dynwrapper::DynamicProxyFactory::checkMethodMatching ( Class  facade,
ComponentInvocationHandler  invHandler 
) throws DynWrapperException [inline, private]

Checks if all methods in facade can be mapped to a corresponding method in delegate using the various mappers for argument translation.

TODO: make this check optional (property etc.) since it's not needed for stable and already verified interfaces. Perhaps move from runtime to buildtime?

Parameters:
facade the interface that is presented to the client (serverside: the container; clientside: the client application).
invHandler the invocation handler that can delegate the facade method calls (serverside: to the component implementation; clientside: to the CORBA stub).
Returns:
true if all parameters can be mapped automatically both ways. false if at least one pair of parameters requires manual mapping.
Exceptions:
DynWrapperException if delegate does not provide a peer method for at least one method in facade. Currently two methods are considered peers if they have the same name and the same number of parameters.

References alma::acs::util::StopWatch::logLapTime(), and m_logger.

Referenced by createClientProxy(), and createServerProxy().

public<T> T alma::acs::component::dynwrapper::DynamicProxyFactory::createClientProxy ( Class< T >  componentInterface,
org.omg.CORBA.Object  corbaStub,
Class<?>  corbaOperationsIF 
) throws DynWrapperException [inline, package]

Creates a proxy object for a corba stub for a component. The proxy object will delegate calls to the corba stub, and will translate parameters as necessary.

Parameters:
componentInterface the component interface
corbaStub 
Returns:
Object
Exceptions:
DynWrapperException 

References checkMethodMatching(), and m_logger.

Object alma::acs::component::dynwrapper::DynamicProxyFactory::createServerProxy ( Class<?extends ACSComponentOperations corbaIF,
ComponentLifecycle  componentImpl,
Class<?>  componentIF 
) throws DynWrapperException [inline]

Creates a proxy object for a component implementation. The proxy object will delegate calls to the component, and will translate parameters as necessary.

Parameters:
corbaIF the IDL-generated xxOperations interface.
componentImpl the component implementation class that implements componentIF. This may be identical with corbaIF, or could be some other similar interface, e.g. one that uses XML binding classes.
componentIF the interface of the component to which calls will be delegated.
Returns:
the proxy object that implements corbaIF and delegates to componentImpl.
Exceptions:
DynWrapperException 

References checkMethodMatching(), and m_logger.

static DynamicProxyFactory alma::acs::component::dynwrapper::DynamicProxyFactory::getDynamicProxyFactory ( Logger  logger  )  [inline, static]

Singleton accessor. The logger must be provided because this class is used both inside the container as well as outside in tests and applications that are clients to container/components. The latter cases might not want to use central ACS logging.

Parameters:
logger 
Returns:
DynamicProxyFactory

References DynamicProxyFactory(), and s_instance.


Member Data Documentation

Referenced by getDynamicProxyFactory().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2