ALMA Computing Group

alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator Class Reference

Interface translator class that presents serialized XML toward the container, but presents the corresponding Java binding objects toward the component implementation. More...

List of all members.

Public Member Functions

ComponentStates componentState ()
String name ()
XmlEntityStruct createObsProposal ()
int dumbMethod (String somevalue)
XmlEntityStruct[] getAllSchedBlocks ()
void addNewSchedBlocks (XmlEntityStruct[] newSchedBlocks)
XmlEntityStruct getBestSchedBlock ()
void xmlInOutMethod (XmlEntityStruct opsPropIn, XmlEntityStructHolder schedBlockOut)
ObsProjectTree getEntireTreeInAStruct ()
String sayHello ()
void exceptionMethod () throws XmlComponentErrorEx

Package Functions

 IFTranslator (XmlComponentJ componentImpl, XmlComponentOperations defaultTranslator, Logger logger)

Private Attributes

boolean m_useDefaultTranslator = true
XmlComponentJ m_componentImpl
XmlComponentOperations m_defaultTranslator
EntitySerializer m_entSer
Logger m_ifTransLogger


Detailed Description

Interface translator class that presents serialized XML toward the container, but presents the corresponding Java binding objects toward the component implementation.

XmlComponentHelper does not really need to provide such a translator class at all, since the container can do all necessary XML (de-)serializations to mediate between the CORBA interface XmlComponentOperations and XmlComponentJ transparently.

Nontheless we want to illustrate the use of the _getInterfaceTranslator method. Even if the container can perform the translation between the various XML method parameters and return types, we still might want to be in full control of this for selected component interface methods.

In the method implementations of IFTranslator, the private instance variable m_useDefaultTranslator controls whether the translation should be delegated to the container (represented by the m_defaultTranslator member object), or if it should be carried out by hand (using the methods marshalEntity and unmarshalEntity). For a real application, we would of course have more fine-grained control on the method level, and likely implement either automatic or manual parameter translation, but not both to choose from. This is done here only for demo purposes.

Definition at line 157 of file XmlComponentHelper.java.


Constructor & Destructor Documentation

alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::IFTranslator XmlComponentJ  componentImpl,
XmlComponentOperations  defaultTranslator,
Logger  logger
[inline, package]
 

Definition at line 167 of file XmlComponentHelper.java.

References m_componentImpl, m_defaultTranslator, m_entSer, and m_ifTransLogger.


Member Function Documentation

void alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::addNewSchedBlocks XmlEntityStruct[]  newSchedBlocks  )  [inline]
 

See also:
alma.demo.XmlComponentOperations#addNewSchedBlocks(alma.xmlentity.XmlEntityStruct[])
Definition at line 263 of file XmlComponentHelper.java.

References m_defaultTranslator, m_ifTransLogger, and m_useDefaultTranslator.

ComponentStates alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::componentState  )  [inline]
 

Definition at line 175 of file XmlComponentHelper.java.

References m_componentImpl.

XmlEntityStruct alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::createObsProposal  )  [inline]
 

See also:
alma.demo.XmlComponentOperations#createObsProposal()
Definition at line 189 of file XmlComponentHelper.java.

References m_componentImpl, m_defaultTranslator, m_entSer, and m_useDefaultTranslator.

int alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::dumbMethod String  somevalue  )  [inline]
 

See also:
alma.demo.XmlComponentOperations#dumbMethod(java.lang.String)
Definition at line 217 of file XmlComponentHelper.java.

References m_componentImpl.

void alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::exceptionMethod  )  throws XmlComponentErrorEx [inline]
 

Definition at line 389 of file XmlComponentHelper.java.

References m_defaultTranslator.

XmlEntityStruct [] alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::getAllSchedBlocks  )  [inline]
 

See also:
alma.demo.XmlComponentOperations#getAllSchedBlocks()
Definition at line 225 of file XmlComponentHelper.java.

References m_componentImpl, m_defaultTranslator, m_entSer, and m_useDefaultTranslator.

XmlEntityStruct alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::getBestSchedBlock  )  [inline]
 

See also:
alma.demo.XmlComponentOperations#getBestSchedBlock()
Definition at line 284 of file XmlComponentHelper.java.

References m_componentImpl, m_defaultTranslator, m_entSer, and m_useDefaultTranslator.

ObsProjectTree alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::getEntireTreeInAStruct  )  [inline]
 

See also:
alma.demo.XmlComponentOperations#getEntireTreeInAStruct()
Definition at line 344 of file XmlComponentHelper.java.

References m_componentImpl, m_defaultTranslator, m_entSer, m_ifTransLogger, and m_useDefaultTranslator.

String alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::name  )  [inline]
 

Definition at line 180 of file XmlComponentHelper.java.

References m_componentImpl.

String alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::sayHello  )  [inline]
 

See also:
alma.demo.XmlComponentOperations#sayHello()
Definition at line 380 of file XmlComponentHelper.java.

References m_componentImpl.

void alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::xmlInOutMethod XmlEntityStruct  opsPropIn,
XmlEntityStructHolder  schedBlockOut
[inline]
 

See also:
alma.demo.XmlComponentOperations#xmlInOutMethod(alma.xmlentity.XmlEntityStruct, alma.xmlentity.XmlEntityStructHolder)
Definition at line 312 of file XmlComponentHelper.java.

References m_componentImpl, m_defaultTranslator, m_entSer, m_ifTransLogger, and m_useDefaultTranslator.


Member Data Documentation

XmlComponentJ alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::m_componentImpl [private]
 

Definition at line 161 of file XmlComponentHelper.java.

Referenced by componentState(), createObsProposal(), dumbMethod(), getAllSchedBlocks(), getBestSchedBlock(), getEntireTreeInAStruct(), IFTranslator(), name(), sayHello(), and xmlInOutMethod().

XmlComponentOperations alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::m_defaultTranslator [private]
 

Definition at line 162 of file XmlComponentHelper.java.

Referenced by addNewSchedBlocks(), createObsProposal(), exceptionMethod(), getAllSchedBlocks(), getBestSchedBlock(), getEntireTreeInAStruct(), IFTranslator(), and xmlInOutMethod().

EntitySerializer alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::m_entSer [private]
 

Definition at line 163 of file XmlComponentHelper.java.

Referenced by createObsProposal(), getAllSchedBlocks(), getBestSchedBlock(), getEntireTreeInAStruct(), IFTranslator(), and xmlInOutMethod().

Logger alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::m_ifTransLogger [private]
 

Definition at line 165 of file XmlComponentHelper.java.

Referenced by addNewSchedBlocks(), getEntireTreeInAStruct(), IFTranslator(), and xmlInOutMethod().

boolean alma::demo::XmlComponentImpl::XmlComponentHelper::IFTranslator::m_useDefaultTranslator = true [private]
 

Definition at line 159 of file XmlComponentHelper.java.

Referenced by addNewSchedBlocks(), createObsProposal(), getAllSchedBlocks(), getBestSchedBlock(), getEntireTreeInAStruct(), and xmlInOutMethod().


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