public class XmlComponentHelper extends ComponentHelper
XmlContainer component.
XmlContainer implements an "inner" functional interface
that is different from the IDL generated XmlComponentOperations.
It uses xml binding classes instead of stringified xml in the method signatures.
An interface translator is created that translates between the flat-xml
in the outer (CORBA) interface and the transparent-xml binding classes
in the inner interface.
componentInstanceName| Constructor and Description |
|---|
XmlComponentHelper(java.util.logging.Logger containerLogger) |
| Modifier and Type | Method and Description |
|---|---|
protected ComponentLifecycle |
_createComponentImpl()
Method _createComponentImpl to be provided by subclasses.
|
protected java.lang.String[] |
_getComponentMethodsExcludedFromInvocationLogging()
Tells the container to not automatically log calls to certain component interface methods.
|
protected java.lang.Object |
_getInterfaceTranslator(java.lang.Object defaultInterfaceTranslator)
To be overridden by subclass only if it wants its own interface translator to be used.
|
protected java.lang.Class<? extends ACSComponentOperations> |
_getOperationsInterface()
Gets the xxOperations interface as generated by the IDL compiler.
|
protected java.lang.Class<? extends org.omg.PortableServer.Servant> |
_getPOATieClass()
This method must be provided by the component helper class.
|
protected java.lang.Class<?> |
getInternalInterface()
Gets the component's implemented functional IF.
|
getComponentImpl, getComponentLogger, getOperationsInterface, requiresOrbCentralLogSuppressionpublic XmlComponentHelper(java.util.logging.Logger containerLogger)
containerLogger - protected ComponentLifecycle _createComponentImpl()
ComponentHelper_createComponentImpl in class ComponentHelperComponentHelper._createComponentImpl()protected java.lang.Class<? extends org.omg.PortableServer.Servant> _getPOATieClass()
ComponentHelperreturn DummyComponentPOATie.class;._getPOATieClass in class ComponentHelperComponentHelper._getPOATieClass()protected java.lang.Class<? extends ACSComponentOperations> _getOperationsInterface()
ComponentHelper_getOperationsInterface in class ComponentHelperClass object associated with the operations interface.ComponentHelper._getOperationsInterface()protected java.lang.Class<?> getInternalInterface()
ComponentHelperTo be overridden by the component helper class only if the InternalInterface differs from the OperationsInterface.
getInternalInterface in class ComponentHelperComponentHelper.getInternalInterface()protected java.lang.Object _getInterfaceTranslator(java.lang.Object defaultInterfaceTranslator)
throws AcsJJavaComponentHelperEx
ComponentHelper
The returned interface translator must implement the component's operations interface,
and must take care of translating in, inout parameters,
forwarding the call to the respective method in the component implementation,
and then translating out, inout parameters, and the return value.
It is foreseen that the necessary translations for most methods will be done
automatically by the dynamic proxy classes. Some methods may require manual translation,
e.g. if an expression that involves xml entity classes is too complex for the
dynamic proxy.
On the other end of the spectrum, a manual implementation may
choose to in parameter, because the binding object
will only be routed through to another component, so first unmarshalling
and later marshalling it would be an unnecessary performance loss.
In that case, the manual interface translator could call an additional
method in the component implementation which expects the marshalled xml
rather than the binding object.
To facilitate the implementation of a manual interface translator,
the defaultInterfaceTranslator is provided; it is a dynamic
proxy object that implements the component's operations interface and
forwards all calls to the component implementation created in
_createComponentImpl, performing type translations in between.
The methods that should be handled automatically can then be directly
delegated to that proxy object, and only those methods that require
special care need to be implemented by hand.
_getInterfaceTranslator in class ComponentHelperdefaultInterfaceTranslator - the default translator that the custon translator may
use to delegate some or all method invocations to.AcsJJavaComponentHelperExComponentHelper._getInterfaceTranslator(java.lang.Object)protected java.lang.String[] _getComponentMethodsExcludedFromInvocationLogging()
ComponentHelperACSComponentOperations#componentState().
Dealing with OffShoots: offshoots that follow the Corba Tie-approach enjoy automatic method invocation logging
just like components do. In the rare event that you explicitly activate offshoots from your component,
and want to suppress automatic logging for certain methods, return String(s) in the
following format: OFFSHOOT::<offshootinterfacename>#<methodname>.
Example for ALMA archive: "OFFSHOOT::Operational#retrieveFragment".
Note that returning Strings is fine (compared with more sophisticated Method objects)
because the functional component interface methods cannot have parameter polymorphism thanks to IDL limitations.
Thus there is no ambiguity in the method names.
_getComponentMethodsExcludedFromInvocationLogging in class ComponentHelper