API java : org.omg.PortableServer


Package org.omg.PortableServer

Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

See:
          Description

Interface Summary
AdapterActivator An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.
AdapterActivatorOperations An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE.
Current The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
CurrentOperations The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
ID_ASSIGNMENT_POLICY_ID org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java .
ID_UNIQUENESS_POLICY_ID org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java .
IdAssignmentPolicy IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
IdAssignmentPolicyOperations IdAssignmentPolicy specifies whether Object Ids in the created POA are generated by the application or by the ORB.
IdUniquenessPolicy The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
IdUniquenessPolicyOperations The IdUniquenessPolicy specifies whether the servants activated in the created POA must have unique object i identities.
IMPLICIT_ACTIVATION_POLICY_ID org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java .
ImplicitActivationPolicy This policy specifies whether implicit activation of servants is supported in the created POA.
ImplicitActivationPolicyOperations This policy specifies whether implicit activation of servants is supported in the created POA.
LIFESPAN_POLICY_ID org/omg/PortableServer/LIFESPAN_POLICY_ID.java .
LifespanPolicy The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
LifespanPolicyOperations The LifespanPolicy specifies the lifespan of the objects implemented in the created POA.
POA A POA object manages the implementation of a collection of objects.
POAManager Each POA object has an associated POAManager object.
POAManagerOperations Each POA object has an associated POAManager object.
POAOperations A POA object manages the implementation of a collection of objects.
REQUEST_PROCESSING_POLICY_ID org/omg/PortableServer/REQUEST_PROCESSING_POLICY_ID.java .
RequestProcessingPolicy This policy specifies how requests are processed by the created POA.
RequestProcessingPolicyOperations This policy specifies how requests are processed by the created POA.
SERVANT_RETENTION_POLICY_ID org/omg/PortableServer/SERVANT_RETENTION_POLICY_ID.java .
ServantActivator When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
ServantActivatorOperations When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
ServantLocator When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
ServantLocatorOperations When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
ServantManager A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object.
ServantManagerOperations A servant manager supplies a POA with the ability to activate objects on demand when the POA receives a request targeted at an inactive object.
ServantRetentionPolicy This policy specifies whether the created POA retains active servants in an Active Object Map.
ServantRetentionPolicyOperations This policy specifies whether the created POA retains active servants in an Active Object Map.
THREAD_POLICY_ID org/omg/PortableServer/THREAD_POLICY_ID.java .
ThreadPolicy The ThreadPolicy specifies the threading model used with the created POA.
ThreadPolicyOperations The ThreadPolicy specifies the threading model used with the created POA.
 

Class Summary
_ServantActivatorStub When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
_ServantLocatorStub When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
CurrentHelper The PortableServer::Current interface, derived from CORBA::Current, provides method implementations with access to the identity of the object on which the method was invoked.
DynamicImplementation Allows dynamic handling of object invocations.
ForwardRequestHelper org/omg/PortableServer/ForwardRequestHelper.java .
IdAssignmentPolicyValue The IdAssignmentPolicyValue can have the following values.
IdUniquenessPolicyValue IdUniquenessPolicyValue can have the following values.
ImplicitActivationPolicyValue ImplicitActivationPolicyValue has the following semantics.
LifespanPolicyValue The LifespanPolicyValue can have the following values.
POAHelper A POA object manages the implementation of a collection of objects.
RequestProcessingPolicyValue The RequestProcessingPolicyValue can have the following values.
Servant Defines the native Servant type.
ServantActivatorHelper When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
ServantActivatorPOA When the POA has the RETAIN policy it uses servant managers that are ServantActivators.
ServantLocatorHelper When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
ServantLocatorPOA When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators.
ServantRetentionPolicyValue ServantRetentionPolicyValue can have the following values.
ThreadPolicyValue The ThreadPolicyValue can have the following values.
 

Exception Summary
ForwardRequest org/omg/PortableServer/ForwardRequest.java .
 

Package org.omg.PortableServer Description

Provides classes and interfaces for making the server side of your applications portable across multivendor ORBs.

In Java, Portable Object Adaptor (POA)-based Dynamic Skeleton Interface (DSI) servants inherit from the standard DynamicImplementation class, which inherits from the Servant class. The native Servant type is defined by the PortableServer module for the POA. In Java, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It serves as the base class for all POA servant implementations and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior.

Package Specification

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

POA-related Interfaces

The PortableServer module defines the following POA-related interfaces:

  • POA
  • POAManager
  • ServantManager
  • ServantActivator
  • ServantLocator
  • AdapterActivator
  • ThreadPolicy
  • LifespanPolicy
  • IdUniquenessPolicy
  • IdAssignmentPolicy
  • ImplicitActivationPolicy
  • ServantRetentionPolicy
  • RequestProcessingPolicy
  • Current

In addition, the POA defines the Servant native type.

Operations classes

Each of the interfaces listed above has an associated Operations interface. The Operations interface is generated by the idlj compiler and contains the method signatures for methods defined in its associated interface. The Operations interface can be accessed by both the client and the server, while its associated interface can only be called by the client.

Value Classes

Classes ending in the suffix PolicyValue provide the values used for the create_POA call, which sets the policy for the POA. See the sample code below for a demonstration. PolicyValue files include the following:

  • IdAssignmentPolicyValue
  • IdUniquenessPolicyValue
  • ImplicitActivationPolicyValue
  • LifespanPolicyValue
  • RequestProcessingPolicyValue
  • ServantRetentionPolicyValue
  • ThreadPolicyValue

Helper Classes

Helper classes, which are generated for all user-defined types in an OMG IDL interface, supply static methods needed to manipulate those types. There is only one method in a helper class that an application programmer uses: the narrow method. Only Java interfaces mapped from IDL interfaces will have a helper class that includes a narrow method, so in the PortableServer package, only the following classes have a narrow method:

  • ForwardRequestHelper
  • ServantActivatorHelper
  • ServantLocatorHelper

POA Classes

POA classes are used to implement the ServantActivator or ServantLocator.

Exceptions

The ForwardRequest exception indicates to the ORB that it is responsible for delivering the current request and subsequent ForwardRequest requests to the object denoted in the forward_reference member of the exception.

Interfaces Implemented by the Application Programmer

Most of what PortableServer does is transparent to the user. The result is that programmers will use only a few of the interfaces mentioned above. The remaining interfaces will be provided by the ORB implementation. The interfaces of interest to application programmers are the following:

  • AdapterActivator

    Adapter activators are associated with POAs. An adapter activator supplies a POA with the ability to create child POAs on demand, as a side-effect of receiving a request that names the child POA (or one of its children), or when find_POA is called with an activate parameter value of TRUE. An application server that creates all its needed POAs at the beginning of execution does not need to use or provide an adapter activator; it is necessary only for the case in which POAs need to be created during request processing.

  • ServantLocator

    When the POA has the NON_RETAIN policy, it uses servant managers that are ServantLocators.

  • ServantActivator

    When the POA has the RETAIN policy, it uses servant managers that are ServantActivators.

Package org.omg.PortableServer.ServantLocatorPackage

This package supplies a CookieHolder class for passing the Cookie type as an out parameter. The CookieHolder class follows exactly the same pattern as the other holder classes for basic types.

Related Documentation

For an overview of Java IDL, please see:

  • Java IDL home page.

    Example Code

    Example Server Code

    1. import javax.naming.InitialContext;
    2. import javax.naming.Context;
    3. import javax.rmi.PortableRemoteObject ;
    4. import com.sun.corba.se.impl.poa.POAORB;
    5. import org.omg.PortableServer.*;
    6. import java.util.*;
    7. import org.omg.CORBA.*;
    8. import javax.rmi.CORBA.Stub;
    9. import javax.rmi.CORBA.Util;
    10.  
    11.  
    12.  
    13. public class HelloServer {
    14. public HelloServer(String[] args) {
    15. try {
    16. Properties p = System.getProperties();
    17. // p.put("org.omg.CORBA.ORBClass", "com.sun.corba.ee.internal.POA.POAORB");
    18. ORB orb = ORB.init( args, p );
    19.  
    20. POA rootPOA = (POA)orb.resolve_initial_references("RootPOA");
    21. <b class="hi">
    22. Policy[] tpolicy = new Policy[3];
    23. tpolicy[0] = rootPOA.create_lifespan_policy(
    24. tpolicy[1] = rootPOA.create_request_processing_policy(
    25. RequestProcessingPolicyValue.USE_ACTIVE_OBJECT_MAP_ONLY );
    26. tpolicy[2] = rootPOA.create_servant_retention_policy(
    27. POA tpoa = rootPOA.create_POA("MyTransientPOA", null, tpolicy);
    28. </b>
    29.  
    30. String ObjectId = "MyObjectId";
    31. byte[] oid = ObjectId.getBytes();
    32.  
    33. org.omg.CORBA.Object obj = tpoa.create_reference_with_id(oid,
    34. new _HelloImpl_Tie()._all_interfaces(tpoa, oid)[0]);
    35. HelloInterface helloRef = (HelloInterface)PortableRemoteObject.narrow(
    36. obj, HelloInterface.class );
    37.  
    38. Context initialNamingContext = new InitialContext();
    39. initialNamingContext.rebind("HelloService", helloRef);
    40. System.out.println("Hello Server: Ready...");
    41. orb.run();
    42. } catch (Exception e) {
    43. System.out.println("Trouble: " + e);
    44. e.printStackTrace();
    45. }
    46. }
    47.  
    48.  
    49. public static void main(String args[]) {
    50. new HelloServer( args );
    51. }
    52. }

    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-2933
    Document créé le 31/08/06 19:51, dernière modification le Vendredi 17 Juin 2011, 12:12
    Source du document imprimé : http://www.gaudry.be/java-api-rf-org/omg/PortableServer/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,74 seconde

    Mises à jour :
    Mises à jour du site
    Citation (masquer)
    Un optimiste est un monsieur qui croit qu'une dame a terminé sa conversation téléphonique parce qu'elle dit au revoir.

    Marcel Achard
     
    l'infobrol
    Nous sommes le Samedi 02 Juin 2012, 10:02, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)