Package org.omg.CORBA

Examples of org.omg.CORBA.ORB.string_to_object()


            if (f.isDirectory()) {
                System.out.println("File " + args[0] + " is a directory.");
                System.exit(-1);
            }
            BufferedReader br = new BufferedReader(new FileReader(f));
            org.omg.CORBA.Object obj = orb.string_to_object(br.readLine());
            br.close();
            SASDemo demo = SASDemoHelper.narrow(obj);

            //call single operation
View Full Code Here


    private RMIServer findRMIServerIIOP(String ior, Map env, boolean isIiop) {
        // could forbid "rmi:" URL here -- but do we need to?
        final ORB orb = (ORB)
            env.get(EnvHelp.DEFAULT_ORB);
        final Object stub = orb.string_to_object(ior);
        return (RMIServer) PortableRemoteObject.narrow(stub, RMIServer.class);
    }

    private RMIServer findRMIServerJRMP(String base64, Map env, boolean isIiop)
        throws IOException {
View Full Code Here

        ((org.jacorb.orb.ORB)orb).addObjectKey("GSLBService", IOR);

        poa.the_POAManager().activate();

        GSLoadBalancerImpl.ID = "LOCAL";
        server = GSLoadBalancerHelper.narrow(orb.string_to_object(localCorbaloc));
    }

    @BeforeClass
    public static void beforeClassSetUp() throws Exception
    {
View Full Code Here

                    else
                    {
                        System.out.println("SERVER IOR: " + corbalocStr);
                    }

                    org.omg.CORBA.Object objP = orb.string_to_object(corbalocStr);
                    if (!cmdArgs.getTestMode())
                    {
                        System.out.println("Server-Persistent ior: " + orb.object_to_string (objP));
                    }
                    else if (cmdArgs.getTestType().equalsIgnoreCase("P") ||
View Full Code Here

    @Before
    public void setUp() throws Exception
    {
        ORB orb = setup.getClientOrb();
        String ior = setup.getServerIOR();
        org.omg.CORBA.Object ref = orb.string_to_object( ior );
        testObj = TestBoundedStringHelper.narrow( ref );
    }

    @Test
    public void testBoundedString ()
View Full Code Here

        Properties props = new Properties();
        props.setProperty("ORBInitRef.MyServer", ior);

        ORB orb = setup.getAnotherORB(props);

        BasicServer server = BasicServerHelper.narrow(orb.string_to_object("corbaloc:rir:/MyServer"));
        assertTrue(new HashSet<String>(Arrays.asList(orb.list_initial_services())).contains("MyServer"));

        long now = System.currentTimeMillis();
        assertEquals(now, server.bounce_long_long(now));
    }
View Full Code Here

                NamingContextHelper.narrow(_orb.resolve_initial_references("NameService"));

            EventChannelFactory _factory;
            if (args != null && args.length == 1) {
                _factory =
                    EventChannelFactoryHelper.narrow(_orb.string_to_object(args[0]));
            } else {
                _factory = EventChannelFactoryHelper.narrow(_orb.resolve_initial_references("NotificationService"));
            }

            org.omg.CORBA.Object cob =
View Full Code Here

    @Test
    public void testNIO() throws Exception
    {
        ORB orb = setup.getClientOrb();
        org.omg.CORBA.Object ref = orb.string_to_object( nioTestURL );

        Any rrtPolicyAny = orb.create_any();
        rrtPolicyAny.insert_ulonglong (ONE_SECOND*2);

        Policy policies[] = new Policy[1];
View Full Code Here

        {
            // Pass
        }
        try
        {
            orb.string_to_object (null);
            fail ("Should have thrown not exist");
        }
        catch (BAD_INV_ORDER e)
        {
            // Pass
View Full Code Here

    @Test
    public void testMIOP() throws InterruptedException
    {
        ORB orb = setup.getClientOrb();
        String ior = setup.getServerIOR();
        org.omg.CORBA.Object ref = orb.string_to_object( ior );
        // Use an unchecked narrow so it doesn't do an is_a call remotely.
        server = GreetingServiceHelper.unchecked_narrow(orb.string_to_object(miopURL));

        String s = "Oneway call";
        server.greeting_oneway(s);
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.