org.omg.PortableInterceptor

Interface ORBInitializerOperations

  • All Known Subinterfaces:
    ORBInitializer

    public interface ORBInitializerOperations
    Facilitates interceptor registration and ORB initialization.

    Interceptors are intended to be a means by which ORB services gain access to ORB processing, effectively becoming part of the ORB. Since Interceptors are part of the ORB, when ORB.init returns an ORB, the Interceptors shall have been registered. Interceptors cannot be registered on an ORB after it has been returned by a call to ORB.init.

    An Interceptor is registered by registering an associated ORBInitializer object which implements the ORBInitializer interface. When an ORB is initializing, it shall call each registered ORBInitializer, passing it an ORBInitInfo object which is used to register its Interceptor.

    Registering ORB Initializers in Java

    ORBInitializers are registered via Java ORB properties.

    The property names are of the form:

    org.omg.PortableInterceptor.ORBInitializerClass.<Service>
    where <Service> is the string name of a class which implements
    org.omg.PortableInterceptor.ORBInitializer
    To avoid name collisions, the reverse DNS name convention should be used. For example, if company X has three initializers, it could define the following properties:
    • org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init1
    • org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init2
    • org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init3
    During ORB.init, these ORB properties which begin with org.omg.PortableInterceptor.ORBInitializerClass shall be collected, the <Service> portion of each property shall be extracted, an object shall be instantiated with the <Service> string as its class name, and the pre_init and post_init methods shall be called on that object. If there are any exceptions, the ORB shall ignore them and proceed.

    Example

    A client-side logging service written by company X, for example, may have the following ORBInitializer implementation:

     package com.x.logging;
     
     import org.omg.PortableInterceptor.Interceptor; 
     import org.omg.PortableInterceptor.ORBInitializer; 
     import org.omg.PortableInterceptor.ORBInitInfo; 
     
     public class LoggingService implements ORBInitializer { 
         void pre_init( ORBInitInfo info ) { 
             // Instantiate the Logging Service s Interceptor. 
             Interceptor interceptor = new LoggingInterceptor(); 
    
             // Register the Logging Service s Interceptor. 
             info.add_client_request_interceptor( interceptor ); 
         } 
     
         void post_init( ORBInitInfo info ) { 
             // This service does not need two init points. 
         } 
     } 
     
    To run a program called MyApp using this logging service, the user could type:
    java -Dorg.omg.PortableInterceptor.ORBInitializerClass.com.x.Logging.LoggingService MyApp

    Notes about Registering Interceptors

    Request Interceptors are registered on a per-ORB basis.

    To achieve virtual per-object Interceptors, query the policies on the target from within the interception points to determine whether they should do any work.

    To achieve virtual per-POA Interceptors, instantiate each POA with a different ORB. While Interceptors may be ordered administratively, there is no concept of order with respect to the registration of Interceptors. Request Interceptors are concerned with service contexts. Service contexts have no order, so there is no purpose for request Interceptors to have an order. IOR Interceptors are concerned with tagged components. Tagged components also have no order, so there is no purpose for IOR Interceptors to have an order.

    Registration code should avoid using the ORB (i.e., calling ORB.init with the provided orb_id). Since registration occurs during ORB initialization, results of invocations on this ORB while it is in this state are undefined.

    See Also:
    ORBInitInfo
    • Method Detail

      • pre_init

        void pre_init(ORBInitInfo info)
        Called during ORB initialization. If it is expected that initial services registered by an interceptor will be used by other interceptors, then those initial services shall be registered at this point via calls to ORBInitInfo.register_initial_reference.
        Parameters:
        info - provides initialization attributes and operations by which Interceptors can be registered.
      • post_init

        void post_init(ORBInitInfo info)
        Called during ORB initialization. If a service must resolve initial references as part of its initialization, it can assume that all initial references will be available at this point.

        Calling the post_init operations is not the final task of ORB initialization. The final task, following the post_init calls, is attaching the lists of registered interceptors to the ORB. Therefore, the ORB does not contain the interceptors during calls to post_init. If an ORB-mediated call is made from within post_init, no request interceptors will be invoked on that call. Likewise, if an operation is performed which causes an IOR to be created, no IOR interceptors will be invoked.

        Parameters:
        info - provides initialization attributes and operations by which Interceptors can be registered.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-org/omg/PortableInterceptor/ORBInitializerOperations.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut