
Public Member Functions | |
| AnyAide (ContainerServicesBase cs) | |
| Any | arrayToCorbaAny (Object objs) throws AcsJException |
| Any | doubleArrayToCorbaAny (double[] doubles) |
| Any | floatArrayToCorbaAny (float[] floats) |
| Any | intArrayToCorbaAny (int[] ints) |
| Any | stringArrayToCorbaAny (String[] strings) |
| Any | objectToCorbaAny (Object obj) throws AcsJException |
| Any | complexObjectToCorbaAny (IDLEntity obj) throws AcsJException |
| Object | corbaAnyToObject (Any any) |
| Object | complexAnyToObject (Any any) |
Protected Member Functions | |
| Any | internalArrayToCorbaAny (Object objs) throws AcsJException |
| String | corbaStructToJavaClass (String id, boolean isNestedStruct) throws IllegalArgumentException |
Private Attributes | |
| final ContainerServicesBase | m_containerServices |
| final Logger | m_logger |
Intended to be used as an aide to developers working with CORBA anys. If there's some method you think should be added to this class to ease developers' lives, please send this suggestion to the alma-sw-common@nrao.edu or acs-discuss@nrao.edu mailing lists.
make package-private once we no longer have a separate "refactored" subpackage.
| alma::acs::nc::AnyAide::AnyAide | ( | ContainerServicesBase | cs | ) | [inline] |
Standard constructor.
| cs | Container services reference of the component. |
References alma::acs::container::ContainerServicesBase::getLogger(), m_containerServices, and m_logger.
| Any alma::acs::nc::AnyAide::arrayToCorbaAny | ( | Object | objs | ) | throws AcsJException [inline] |
Converts an array of simple type instances to a CORBA any.
| objs | An array of CORBA simple types supported by BACI. For example, double[], string[], etc. |
| AcsJException | Thrown when the array type is not supported. |
References internalArrayToCorbaAny().
| Object alma::acs::nc::AnyAide::complexAnyToObject | ( | Any | any | ) | [inline] |
Extracts from a Corba Any the embedded user-defined event data. The returned data can be either
IDLEntity if an IDL-defined struct was sent, or Other non-IDL defined classes or primitive types are not allowed as event data (not totally sure but it seems like that, HSO 2006-12).
| any | CORBA Any containing a complex, user-defined object within it |
null if the conversion failed. References corbaStructToJavaClass(), and m_logger.
Referenced by alma::acs::nc::Consumer::push_structured_event().
| Any alma::acs::nc::AnyAide::complexObjectToCorbaAny | ( | IDLEntity | obj | ) | throws AcsJException [inline] |
Converts a complex CORBA-based object to a CORBA any.
| obj | A complex CORBA-based object such as a user-defined IDL struct. |
| AcsJException | if any problem occurs with the conversion. |
References alma::acs::container::ContainerServicesBase::getAdvancedContainerServices(), alma::acs::container::AdvancedContainerServices::getAny(), m_containerServices, and m_logger.
Referenced by alma::acs::nc::StructuredEventCreator::createEvent(), objectToCorbaAny(), alma::acs::nc::SimpleSupplier::publishEvent(), and alma::acs::nc::refactored::NCPublisher::publishEvent().
| Object alma::acs::nc::AnyAide::corbaAnyToObject | ( | Any | any | ) | [inline] |
Method which attempts to (and under normal circumstances should succeed) convert a CORBA any object to the corresponding Java object. For simple CORBA types such as long, this method will extract the long and embed it within a java.lang.Long object. In the event of failure, a null object is returned.
| any | A CORBA any containing some sort of CORBA object |
null if it failed. References m_logger.
Referenced by alma::acs::nc::ArchiveConsumer::push_structured_event().
| String alma::acs::nc::AnyAide::corbaStructToJavaClass | ( | String | id, | |
| boolean | isNestedStruct | |||
| ) | throws IllegalArgumentException [inline, protected] |
Derives the qualified Java class name for an IDL-defined struct from the Corba ID of that struct.
| isNestedStruct | if true, "Package" will be inserted according to "IDL to Java LanguageMapping Specification" version 1.2: 1.17 Mapping for Certain Nested Types apply. |
Referenced by complexAnyToObject(), and alma::acs::nc::AnyAideTest::testCorbaStructToJavaClass().
| Any alma::acs::nc::AnyAide::doubleArrayToCorbaAny | ( | double[] | doubles | ) | [inline] |
| Any alma::acs::nc::AnyAide::floatArrayToCorbaAny | ( | float[] | floats | ) | [inline] |
| Any alma::acs::nc::AnyAide::intArrayToCorbaAny | ( | int[] | ints | ) | [inline] |
| Any alma::acs::nc::AnyAide::internalArrayToCorbaAny | ( | Object | objs | ) | throws AcsJException [inline, protected] |
Moved here from the now-deprecated method arrayToCorbaAny.
References doubleArrayToCorbaAny(), floatArrayToCorbaAny(), intArrayToCorbaAny(), and stringArrayToCorbaAny().
Referenced by arrayToCorbaAny(), and objectToCorbaAny().
| Any alma::acs::nc::AnyAide::objectToCorbaAny | ( | Object | obj | ) | throws AcsJException [inline] |
Converts a generic Java object to a CORBA Any. May fail.
| obj | Object to be converted to a CORBA any |
| AcsJException | Thrown if there's some problem converting the object to an any. TODO: make sure this works with enumerations. |
References complexObjectToCorbaAny(), alma::acs::container::ContainerServicesBase::getAdvancedContainerServices(), alma::acs::container::AdvancedContainerServices::getAny(), internalArrayToCorbaAny(), and m_containerServices.
Referenced by alma::acs::nc::ArchiveSupplier::publishEvent().
| Any alma::acs::nc::AnyAide::stringArrayToCorbaAny | ( | String[] | strings | ) | [inline] |
final ContainerServicesBase alma::acs::nc::AnyAide::m_containerServices [private] |
reference to the container services
Referenced by AnyAide(), complexObjectToCorbaAny(), doubleArrayToCorbaAny(), floatArrayToCorbaAny(), intArrayToCorbaAny(), objectToCorbaAny(), and stringArrayToCorbaAny().
final Logger alma::acs::nc::AnyAide::m_logger [private] |
our own logger
Referenced by AnyAide(), complexAnyToObject(), complexObjectToCorbaAny(), and corbaAnyToObject().
1.6.2