Package org.omg.PortableServer

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


        BasicServerImpl servant = new BasicServerImpl();

        rootPOA.activate_object(servant);

        BasicServer server = BasicServerHelper.narrow(rootPOA.servant_to_reference(servant));

        System.out.println ("SERVER IOR: " + orb.object_to_string(server));
        System.out.flush();

        orb.run();
View Full Code Here


            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

            SampleImpl result = new SampleImpl();
            POA poa = _default_POA().create_POA("poa-" + System.currentTimeMillis(),
                                                null, null);
            poa.the_POAManager().activate();
            poa.activate_object(result);
            org.omg.CORBA.Object obj = poa.servant_to_reference (result);
            return SampleHelper.narrow (obj);
        }
        catch (Exception ex)
        {
            throw new RuntimeException ("Exception creating result object: "
View Full Code Here

        final String servantName = args[0];
        Class<?> servantClass = TestUtils.classForName(servantName);
        Servant servant = ( Servant ) servantClass.newInstance();

        // create the object reference
        org.omg.CORBA.Object obj = bidir_poa.servant_to_reference(servant);

        System.out.println("SERVER IOR: "+orb.object_to_string(obj));
        System.out.flush();

        orb.run();
View Full Code Here

            POA bidir_poa = root_poa.create_POA( "BiDirPOA",
                                                 root_poa.the_POAManager(),
                                                 policies );
            bidir_poa.the_POAManager().activate();

            final CallbackIf myself = CallbackIfHelper.narrow( bidir_poa.servant_to_reference( new CallbackIfImpl() ));

            //narrow to test interface
            final TestIf remoteObj = TestIfHelper.narrow( setup.getServerObject() );

            final int callInterval = 1;
View Full Code Here

        Servant servant =  new RepositoryPOATie( this );
        ifrPOA.activate_object_with_id("IfR".getBytes(), servant);

        Repository myRef =
            RepositoryHelper.narrow(
                    ifrPOA.servant_to_reference( servant ) );

        for( int i = 0; strtok.hasMoreTokens(); i++ )
        {
            paths[i] =  strtok.nextToken();
View Full Code Here

            Class _servantClass = Class.forName(_servantClassName);

            Servant _servant = (Servant) _servantClass.newInstance();

            // create the object reference
            org.omg.CORBA.Object o = poa.servant_to_reference(_servant);

            Socket _socket = new Socket("localhost", _portToSendIorTo);

            PrintWriter _out = new PrintWriter(_socket.getOutputStream(), true);
View Full Code Here

                    poa.activate_object_with_id (servant.getClass().getName().getBytes(), servant);
                    obj = poa.id_to_reference (servant.getClass().getName().getBytes());
                }
                else
                {
                    obj = poa.servant_to_reference( servant );
                }

                ior = "SERVER IOR: " + orb.object_to_string(obj);
            }
View Full Code Here

        if (tester_ != null)
            tester_.test_transport_current (this._orb ());

        try {
            POA rootPOA = POAHelper.narrow (_orb ().resolve_initial_references ("RootPOA"));
            CurrentServer server_ = CurrentServerHelper.narrow (rootPOA.servant_to_reference (this));

            server_.invoked_during_upcall ();
        }
        catch (InvalidName e) {
            // TODO Auto-generated catch block
View Full Code Here

        serverORB = this.getAnotherORB(serverProps);

        POA rootPOA = POAHelper.narrow(serverORB.resolve_initial_references("RootPOA"));
        rootPOA.the_POAManager().activate();
        org.omg.CORBA.Object obj = rootPOA.servant_to_reference(new CurrentServerImpl(serverORB, new DefaultTester()));
        String objString = serverORB.object_to_string(obj);

        Thread.sleep(1000);
        clientORB = this.getAnotherORB(null);
        server_ = CurrentServerHelper.narrow(clientORB.string_to_object(objString));
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.