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

alma::acs::nc::AnyAide Class Reference

List of all members.

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

Detailed Description

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.

Author:
dfugate
Version:
$Id$


Constructor & Destructor Documentation

alma::acs::nc::AnyAide::AnyAide ContainerServicesBase  cs  )  [inline]
 

Standard constructor.

Parameters:
cs Container services reference of the component.


Member Function Documentation

Any alma::acs::nc::AnyAide::arrayToCorbaAny Object  objs  )  throws AcsJException [inline]
 

Converts an array of simple type instances to a CORBA any.

Parameters:
objs An array of CORBA simple types supported by BACI. For example, double[], string[], etc.
Returns:
A CORBA any with the array of simple types.
Exceptions:
AcsJException Thrown when the array type is not supported.

Deprecated:
use one of the type-safe methods such as doubleArrayToCorbaAny(double[]). This method will be removed. HSO-20061221: It actually seems that this method is never used outside of this package. Probably it was more useful before we got the restriction that only IDL-defined structs can be sent as event data Thus we could also have the replacement methods like doubleArrayToCorbaAny with less than public visibility. (an inferred rule which I have not seen stated clearly).

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

  1. a class implementing IDLEntity if an IDL-defined struct was sent, or
  2. an array of IDL-defined structs
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).

Parameters:
any CORBA Any containing a complex, user-defined object within it
Returns:
the CORBA Any parameter converted to an object of the corresponding Java type, or null if the conversion failed.

Any alma::acs::nc::AnyAide::complexObjectToCorbaAny IDLEntity  obj  )  throws AcsJException [inline]
 

Converts a complex CORBA-based object to a CORBA any.

Parameters:
obj A complex CORBA-based object such as a user-defined IDL struct.
Returns:
A CORBA any containing obj.
Exceptions:
AcsJException if any problem occurs with the conversion.

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.

Parameters:
any A CORBA any containing some sort of CORBA object
Returns:
the CORBA any converted into the corresponding Java type, or null if it failed.

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.

Parameters:
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.

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.

Any alma::acs::nc::AnyAide::objectToCorbaAny Object  obj  )  throws AcsJException [inline]
 

Converts a generic Java object to a CORBA Any. May fail.

Parameters:
obj Object to be converted to a CORBA any
Returns:
A CORBA any with obj's data embedded within it.
Exceptions:
AcsJException Thrown if there's some problem converting the object to an any. TODO: make sure this works with enumerations.

Any alma::acs::nc::AnyAide::stringArrayToCorbaAny String[]  strings  )  [inline]
 


Member Data Documentation

final ContainerServicesBase alma::acs::nc::AnyAide::m_containerServices [private]
 

reference to the container services

final Logger alma::acs::nc::AnyAide::m_logger [private]
 

our own logger


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