Public Member Functions | |
AnyAide (ContainerServicesBase cs) | |
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 |
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 | ) |
Standard constructor.
cs | Container services reference of the component. |
References alma.acs.container.ContainerServicesBase.getLogger().
Object alma.acs.nc.AnyAide.complexAnyToObject | ( | Any | any | ) |
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 alma.acs.nc.AnyAide.corbaStructToJavaClass().
Referenced by alma.acs.nc.refactored.NCSubscriber.push_structured_event(), and alma.acs.nc.Consumer.push_structured_event().
Any alma.acs.nc.AnyAide.complexObjectToCorbaAny | ( | IDLEntity | obj | ) | throws AcsJException |
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().
Referenced by alma.acs.nc.AnyAide.objectToCorbaAny(), alma.acs.nc.SimpleSupplier.publishEvent(), and alma.acs.nc.refactored.NCPublisher.publishEvent().
Object alma.acs.nc.AnyAide.corbaAnyToObject | ( | Any | any | ) |
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. Referenced by alma.acs.nc.ArchiveConsumer.push_structured_event().
String alma.acs.nc.AnyAide.corbaStructToJavaClass | ( | String | id, | |
boolean | isNestedStruct | |||
) | throws IllegalArgumentException [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 alma.acs.nc.AnyAide.complexAnyToObject().
Any alma.acs.nc.AnyAide.doubleArrayToCorbaAny | ( | double[] | doubles | ) |
Any alma.acs.nc.AnyAide.floatArrayToCorbaAny | ( | float[] | floats | ) |
Any alma.acs.nc.AnyAide.intArrayToCorbaAny | ( | int[] | ints | ) |
Any alma.acs.nc.AnyAide.internalArrayToCorbaAny | ( | Object | objs | ) | throws AcsJException [protected] |
Moved here from method arrayToCorbaAny (deleted in ACS 9.0).
References alma.acs.nc.AnyAide.doubleArrayToCorbaAny(), alma.acs.nc.AnyAide.floatArrayToCorbaAny(), alma.acs.nc.AnyAide.intArrayToCorbaAny(), and alma.acs.nc.AnyAide.stringArrayToCorbaAny().
Referenced by alma.acs.nc.AnyAide.objectToCorbaAny().
Any alma.acs.nc.AnyAide.objectToCorbaAny | ( | Object | obj | ) | throws AcsJException |
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 alma.acs.nc.AnyAide.complexObjectToCorbaAny(), alma.acs.container.ContainerServicesBase.getAdvancedContainerServices(), and alma.acs.nc.AnyAide.internalArrayToCorbaAny().
Referenced by alma.acs.nc.ArchiveSupplier.publishEvent().
Any alma.acs.nc.AnyAide.stringArrayToCorbaAny | ( | String[] | strings | ) |