Examples of servant_to_reference()


Examples of org.omg.PortableServer.POA.servant_to_reference()

            Object rootPoaRef = orb.resolve_initial_references("RootPOA");
            POA rootPoa = POAHelper.narrow(rootPoaRef);
            rootPoa.the_POAManager().activate();

            SMSGatewayServant smsGateway = new SMSGatewayServant();
            Object smsGatewayRef = rootPoa.servant_to_reference(smsGateway);

            String corbaServerName = "SMSGatewayCORBAService";
            NameComponent[] name = {new NameComponent(corbaServerName, "")};
            namingCtx.rebind(name, smsGatewayRef);
View Full Code Here

Examples of org.omg.PortableServer.POA.servant_to_reference()

    LifespanPolicyValue.PERSISTENT);

      POA poa = rootPOA.create_POA("SerialContextProviderPOA", null,
           policy);
      poa.the_POAManager().activate();
      org.omg.CORBA.Object provider = poa.servant_to_reference(
              (Servant)servantsTie);
           
            // put object in NameService
            org.omg.CORBA.Object objRef =
                ORBManager.getORB().resolve_initial_references("NameService");
View Full Code Here

Examples of org.omg.PortableServer.POA.servant_to_reference()

    {
        POA poa = servant._default_POA() ;
        org.omg.CORBA.Object ref = null ;

        try {
            ref = poa.servant_to_reference( servant ) ;
        } catch (ServantNotActive sna) {
            throw wrapper.getDelegateServantNotActive( sna ) ;
        } catch (WrongPolicy wp) {
            throw wrapper.getDelegateWrongPolicy( wp ) ;
        }
View Full Code Here

Examples of org.omg.PortableServer.POA.servant_to_reference()

            } else {
                _factory = EventChannelFactoryHelper.narrow(_orb.resolve_initial_references("NotificationService"));
            }

            org.omg.CORBA.Object cob =
                _poa.servant_to_reference(new WhiteBoardFactory(_orb, _poa, _factory));

            NameComponent [] name = new NameComponent[1];
            name[0] = new NameComponent( "WhiteBoard", "Factory");

            // an Namen binden
View Full Code Here

Examples of org.omg.PortableServer.POA.servant_to_reference()

        try
        {
            ORB orb = ORB.init( args, null );
            POA poa = (POA) orb.resolve_initial_references( "RootPOA" );
            poa.the_POAManager().activate();
            org.omg.CORBA.Object demo = poa.servant_to_reference( new Server( orb ));
            PrintWriter pw = new PrintWriter( new FileWriter( args[ 0 ] ));
            pw.println( orb.object_to_string( demo ));
            pw.flush();
            pw.close();
            orb.run();
View Full Code Here

Examples of org.omg.PortableServer.POA.servant_to_reference()

            POA securePOA = rootPOA.create_POA("SecurePOA", rootPOA.the_POAManager(), policies);
            rootPOA.the_POAManager().activate();

            // create object and write out IOR
            securePOA.activate_object_with_id("SecureObject".getBytes(), this);
            org.omg.CORBA.Object demo = securePOA.servant_to_reference(this);
            PrintWriter pw = new PrintWriter(new FileWriter(args[0]));
            pw.println(orb.object_to_string(demo));
            pw.flush();
            pw.close();
        } catch (Exception e) {
View Full Code Here

Examples of org.omg.PortableServer.POA.servant_to_reference()

            rootPOA.the_POAManager().activate();

            // create object and write out IOR
            GssUpServer server = new GssUpServer(orb);
            securePOA.activate_object_with_id("SecureObject".getBytes(), server);
            org.omg.CORBA.Object demo = securePOA.servant_to_reference(server);
            PrintWriter pw = new PrintWriter(new FileWriter(args[0]));
            pw.println(orb.object_to_string(demo));
            pw.flush();
            pw.close();
View Full Code Here

Examples of org.omg.PortableServer.POA.servant_to_reference()

            Current current = (org.omg.SecurityLevel2.Current)
                orb.resolve_initial_references( "SecurityCurrent" );

            org.omg.CORBA.Object demo =
                poa.servant_to_reference( new Server( current ));

            PrintWriter pw =
                new PrintWriter( new FileWriter( args[ 0 ] ));

            // print stringified object reference to file
View Full Code Here

Examples of org.omg.PortableServer.POA.servant_to_reference()

            DomainParticipantFactoryImpl impl = new DomainParticipantFactoryImpl(
                    orb, poa);

            // get object reference from the servant (and implicitly register
            // it)
            org.omg.CORBA.Object oref = poa.servant_to_reference(impl);
            DomainParticipantFactory ref = DomainParticipantFactoryHelper
                    .narrow(oref);

            if (ncRef != null) {
                // bind the Object Reference in Naming
View Full Code Here

Examples of org.omg.PortableServer.POA.servant_to_reference()

            suscriberqos = new SubscriberQos(new org.omg.dds.PresentationQosPolicy( org.omg.dds.PresentationQosPolicyAccessScopeKind.from_int(0), false  ,false ), new PartitionQosPolicy(st),new GroupDataQosPolicy(tab),new org.omg.dds.EntityFactoryQosPolicy(false));       
            suscriber = domainparticipant.create_subscriber(suscriberqos,null);
            datareaderqos = new DataReaderQos(new DurabilityQosPolicy( DurabilityQosPolicyKind.from_int(0),new Duration_t(0,0)),new DeadlineQosPolicy(new Duration_t(0,0)),new org.omg.dds.LatencyBudgetQosPolicy(new Duration_t(0,0)),new org.omg.dds.LivelinessQosPolicy (LivelinessQosPolicyKind.from_int(0),new Duration_t(0,0)),new org.omg.dds.ReliabilityQosPolicy(ReliabilityQosPolicyKind.from_int(0),new Duration_t(0,0)),new org.omg.dds.DestinationOrderQosPolicy(DestinationOrderQosPolicyKind.from_int(0)),new org.omg.dds.HistoryQosPolicy(org.omg.dds.HistoryQosPolicyKind.from_int(0),0),new org.omg.dds.ResourceLimitsQosPolicy(0,0,0),new org.omg.dds.UserDataQosPolicy(tab) , new org.omg.dds.TimeBasedFilterQosPolicy(new Duration_t(0,0) ) , new org.omg.dds.ReaderDataLifecycleQosPolicy(new Duration_t(0,0)));
            datareader = suscriber. create_datareader(topic,datareaderqos,null);
            foodatareader = FooDataReaderHelper.narrow(datareader);
            DataReaderListener listener = DataReaderListenerHelper.narrow(poa.servant_to_reference(new FooDataReaderListenerImpl())) ;
            foodatareader.set_listener(listener,0)
            orb.run();             
        }
        catch(Exception e){
            System.out.println(" ERROR : " + e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.