Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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 corbaIF, java.lang.Object componentImpl, Class componentIF) throws DynWrapperException

Static Public Member Functions

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

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]
 


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.

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 

Object alma::acs::component::dynwrapper::DynamicProxyFactory::createServerProxy Class  corbaIF,
java.lang.Object  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 

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


Member Data Documentation

Logger alma::acs::component::dynwrapper::DynamicProxyFactory::m_logger = null [private]
 

DynamicProxyFactory alma::acs::component::dynwrapper::DynamicProxyFactory::s_instance [static, private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:52:20 2009 for ACS Java API by doxygen 1.3.8