API java : org.omg.DynamicAny


Package org.omg.DynamicAny

Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

See:
          Description

Interface Summary
DynAny Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
DynAnyFactory DynAny objects can be created by invoking operations on the DynAnyFactory object.
DynAnyFactoryOperations DynAny objects can be created by invoking operations on the DynAnyFactory object.
DynAnyOperations Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
DynArray DynArray objects support the manipulation of IDL arrays.
DynArrayOperations DynArray objects support the manipulation of IDL arrays.
DynEnum DynEnum objects support the manipulation of IDL enumerated values.
DynEnumOperations DynEnum objects support the manipulation of IDL enumerated values.
DynFixed DynFixed objects support the manipulation of IDL fixed values.
DynFixedOperations DynFixed objects support the manipulation of IDL fixed values.
DynSequence DynSequence objects support the manipulation of IDL sequences.
DynSequenceOperations DynSequence objects support the manipulation of IDL sequences.
DynStruct DynStruct objects support the manipulation of IDL struct and exception values.
DynStructOperations DynStruct objects support the manipulation of IDL struct and exception values.
DynUnion DynUnion objects support the manipulation of IDL unions.
DynUnionOperations DynUnion objects support the manipulation of IDL unions.
DynValue DynValue objects support the manipulation of IDL non-boxed value types.
DynValueBox DynValueBox objects support the manipulation of IDL boxed value types.
DynValueBoxOperations DynValueBox objects support the manipulation of IDL boxed value types.
DynValueCommon DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
DynValueCommonOperations DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
DynValueOperations DynValue objects support the manipulation of IDL non-boxed value types.
 

Class Summary
_DynAnyFactoryStub DynAny objects can be created by invoking operations on the DynAnyFactory object.
_DynAnyStub Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
_DynArrayStub DynArray objects support the manipulation of IDL arrays.
_DynEnumStub DynEnum objects support the manipulation of IDL enumerated values.
_DynFixedStub DynFixed objects support the manipulation of IDL fixed values.
_DynSequenceStub DynSequence objects support the manipulation of IDL sequences.
_DynStructStub DynStruct objects support the manipulation of IDL struct and exception values.
_DynUnionStub DynUnion objects support the manipulation of IDL unions.
_DynValueStub DynValue objects support the manipulation of IDL non-boxed value types.
AnySeqHelper org/omg/DynamicAny/AnySeqHelper.java .
DynAnyFactoryHelper DynAny objects can be created by invoking operations on the DynAnyFactory object.
DynAnyHelper Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
DynAnySeqHelper org/omg/DynamicAny/DynAnySeqHelper.java .
DynArrayHelper DynArray objects support the manipulation of IDL arrays.
DynEnumHelper DynEnum objects support the manipulation of IDL enumerated values.
DynFixedHelper DynFixed objects support the manipulation of IDL fixed values.
DynSequenceHelper DynSequence objects support the manipulation of IDL sequences.
DynStructHelper DynStruct objects support the manipulation of IDL struct and exception values.
DynUnionHelper DynUnion objects support the manipulation of IDL unions.
DynValueHelper DynValue objects support the manipulation of IDL non-boxed value types.
FieldNameHelper org/omg/DynamicAny/FieldNameHelper.java .
NameDynAnyPair org/omg/DynamicAny/NameDynAnyPair.java .
NameDynAnyPairHelper org/omg/DynamicAny/NameDynAnyPairHelper.java .
NameDynAnyPairSeqHelper org/omg/DynamicAny/NameDynAnyPairSeqHelper.java .
NameValuePair org/omg/DynamicAny/NameValuePair.java .
NameValuePairHelper org/omg/DynamicAny/NameValuePairHelper.java .
NameValuePairSeqHelper org/omg/DynamicAny/NameValuePairSeqHelper.java .
 

Package org.omg.DynamicAny Description

Provides classes and interfaces that enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value.

An any can be passed to a program that doesn't have any static information for the type of the any (code generated for the type by an IDL compiler has not been compiled with the object implementation). As a result, the object receiving the any does not have a portable method of using it.

DynAnys enable traversal of the data value associated with an any at runtime, and extraction of the primitive constituents of the data value. This is especially helpful for writing powerful generic servers (bridges, event channels supporting filtering). Similarly, this facility enables the construction of an any at runtime, without having static knowledge of its type. This is especially helpful for writing generic clients (bridges, browsers, debuggers, user interface tools).

Any values can be dynamically interpreted (traversed) and constructed through DynAny objects. A DynAny object is associated with a data value which corresponds to a copy of the value inserted into an Any. A DynAny object may be viewed as an ordered collection of component DynAnys. For DynAnys representing a basic type, such as long, or a type without components, such as an empty exception, the ordered collection of components is empty.

Each DynAny object maintains the notion of a current position into its collection of component DynAnys. The current position is identified by an index value that runs from 0 to n-1, where n is the number of components. The special index value -1 indicates a current position that points nowhere. For values that cannot have a current position (such as an empty exception), the index value is fixed at -1. If a DynAny is initialized with a value that has components, the index is initialized to 0. After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode that permits components), the current position depends on the type of value represented by the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny gets default values for its components.)

The iteration operations rewind, seek, and next can be used to change the current position and the current_component operation returns the component at the current position. The component_count operation returns the number of components of a DynAny. Collectively, these operations enable iteration over the components of a DynAny, for example, to (recursively) examine its contents.

A constructed DynAny object is a DynAny object associated with a constructed type. There is a different interface, inheriting from the DynAny interface, associated with each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array, exception, and value type). A constructed DynAny object exports operations that enable the creation of new DynAny objects, each of them associated with a component of the constructed data value. As an example, a DynStruct is associated with a struct value. This means that the DynStruct may be seen as owning an ordered collection of components, one for each structure member. The DynStruct object exports operations that enable the creation of new DynAny objects, each of them associated with a member of the struct.

If a DynAny object has been obtained from another (constructed) DynAny object, such as a DynAny representing a structure member that was created from a DynStruct, the member DynAny is logically contained in the DynStruct. Calling an insert or get operation leaves the current position unchanged. Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny) also destroys any component DynAny objects obtained from it. Destroying a non-top level DynAny object does nothing. Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST. If the programmer wants to destroy a DynAny object but still wants to manipulate some component of the data value associated with it, then he or she should first create a DynAny for the component and, after that, make a copy of the created DynAny object.

The behavior of DynAny objects has been defined in order to enable efficient implementations in terms of allocated memory space and speed of access. DynAny objects are intended to be used for traversing values extracted from anys or constructing values of anys at runtime. Their use for other purposes is not recommended.

Handling DynAny objects

Insert and get operations are necessary to handle basic DynAny objects but are also helpful to handle constructed DynAny objects. Inserting a basic data type value into a constructed DynAny object implies initializing the current component of the constructed data value associated with the DynAny object. For example, invoking insert_boolean on a DynStruct implies inserting a boolean data value at the current position of the associated struct data value. A type is consistent for inserting or extracting a value if its TypeCode is equivalent to the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode of the DynAny at the current position.

Basic operations include:

  • insert_boolean, get_boolean
  • insert_char, get_char
  • insert_short, get_short
  • insert_ushort, get_ushort
  • insert_long, get_long
  • insert_ulong, get_ulong
  • insert_double, get_double
  • insert_string, get_string
  • insert_reference, get_reference
  • insert_typecode, get_typecode
  • insert_longlong, get_longlong
  • insert_ulonglong, get_ulonglong
  • insert_longdouble, get_longdouble
  • insert_wchar, get_wchar
  • insert_wstring, get_wstring
  • insert_any, get_any
  • insert_dyn_any, get_dyn_any
  • insert_val, get_val
  • insert_octet, get_octet
  • insert_float, get_float
  • get_value
  • get_as_string
  • get_as_ulong
  • get_members
  • get_members_as_dyn_any
  • get_discriminator
  • get_length
  • get_elements
  • get_elements_as_dyn_any
  • get_boxed_value
  • get_boxed_value_as_dyn_any

DynAny and DynAnyFactory objects are intended to be local to the process in which they are created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported to other processes, or externalized with ORB.object_to_string(). If any attempt is made to do so, the offending operation will raise a MARSHAL system exception. Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object interface may raise the standard NO_IMPLEMENT exception. An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.

Package Specification

For a precise list of supported sections of official specifications with which the Java 2 Platform, Standard Edition, v.1.4 ORB complies, see Official Specifications for CORBA support in J2SE 1.4.

Since:
1.4

Ces informations proviennent du site de http://java.sun.com

Remarques

Contenu

Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :

Quels sont les motivations de cette démarche?

Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.

Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.

Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.

Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.

Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.

Réseaux sociaux

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.

 

Nuage de mots clés

7 mots clés dont 0 définis manuellement (plus d'information...).

Avertissement

Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.

 

Astuce pour imprimer les couleurs des cellules de tableaux : http://www.gaudry.be/ast-rf-450.html
Aucun commentaire pour cette page

© Ce document issu de l′infobrol est enregistré sous le certificat Cyber PrInterDeposit Digital Numbertection. Enregistrement IDDN n° 5329-1043
Document créé le 23/08/06 03:58, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-rf-org/omg/DynamicAny/package-summary.html Document affiché 1 fois ce mois de Juin.
St.Gaudry©07.01.02
Outils (masquer)
||
Recherche (afficher)
Recherche :

Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
15832 documents
452 astuces.
549 niouzes.
3099 definitions.
447 membres.
8115 messages.

Document genere en :
0,53 seconde

Mises à jour :
Mises à jour du site
Citation (masquer)
Le monde tourne, c'est tout. On peut s'accrocher et tourner avec, ou se lever pour protester et se faire éjecter.

Stephen King [Extrait de La ligne verte]
 
l'infobrol
Nous sommes le Samedi 02 Juin 2012, 14:01, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)