Package org.omg.CosNaming

Examples of org.omg.CosNaming.NamingContextExt


            // get the root naming context
            org.omg.CORBA.Object objRef = orb
                    .resolve_initial_references("NameService");
            // Use NamingContextExt which is part of the Interoperable
            // Naming Service (INS) specification.
            NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
            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
                NameComponent path[] = ncRef
                        .to_name("DomainParticipantFactory");
                ncRef.rebind(path, ref);
            }
            System.out.println("Server ready and waiting ...");
            orb.run();
        } catch (Exception e) {
            System.out.println("e" + e);
View Full Code Here


            SubscriberQos suscriberqos ;
            DataReaderQos datareaderqos ;     
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            // Use NamingContextExt which is part of the Interoperable
            // Naming Service (INS) specification.
            NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
           
            // resolve the Object Reference in Naming
            String rname = "DomainParticipantFactory";
            byte tab[ ] = new byte [1];
            tab[0] = 1 ;
            org.omg.dds.UserDataQosPolicy UDQP  = new UserDataQosPolicy(tab);
            DomainParticipantQos DPQOS = new DomainParticipantQos(UDQP,new EntityFactoryQosPolicy()) ;
            domainparticipantFactory = DomainParticipantFactoryHelper.narrow(ncRef.resolve_str(rname));
            TopicQos tq = new TopicQos(new TopicDataQosPolicy(tab),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.TransportPriorityQosPolicy(0),new org.omg.dds.LifespanQosPolicy (new Duration_t(0,0)),new org.omg.dds.OwnershipQosPolicy(org.omg.dds.OwnershipQosPolicyKind.from_int(0)));
            domainparticipant = domainparticipantFactory.create_participant(0,DPQOS,null);           
            topic = domainparticipant.create_topic("foo","demo.dds.dcps.foosample.Foo",tq ,null);           
            String  st  [] = new String [1];
            st[0] = "" ;
View Full Code Here

            DataReaderQos datareaderqos;
            org.omg.CORBA.Object objRef = orb
                    .resolve_initial_references("NameService");
            // Use NamingContextExt which is part of the Interoperable
            // Naming Service (INS) specification.
            NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

            // resolve the Object Reference in Naming
            String rname = "DomainParticipantFactory";
            byte tab[] = new byte[1];
            tab[0] = 1;
            org.omg.dds.UserDataQosPolicy UDQP = new UserDataQosPolicy(tab);
            DomainParticipantQos DPQOS = new DomainParticipantQos(UDQP,
                    new EntityFactoryQosPolicy());
            domainparticipantFactory = DomainParticipantFactoryHelper
                    .narrow(ncRef.resolve_str(rname));
            TopicQos tq = new TopicQos(
                    new TopicDataQosPolicy(tab),
                    new DurabilityQosPolicy(
                            DurabilityQosPolicyKind.from_int(0),
                            new Duration_t(0, 0)),
View Full Code Here

            org.omg.CORBA.Object objRef = orb
                    .resolve_initial_references("NameService");
            // Use NamingContextExt which is part of the Interoperable
            // Naming Service (INS) specification.
            NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
            // resolve the Object Reference in Naming
            String rname = "DomainParticipantFactory";
            byte tab[] = new byte[1];
            tab[0] = 1;
            org.omg.dds.UserDataQosPolicy UDQP = new UserDataQosPolicy(tab);
            DomainParticipantQos DPQOS = new DomainParticipantQos(UDQP,
                    new EntityFactoryQosPolicy());
            domainparticipantFactory = DomainParticipantFactoryHelper
                    .narrow(ncRef.resolve_str(rname));
            TopicQos tq = new TopicQos(
                    new TopicDataQosPolicy(tab),
                    new DurabilityQosPolicy(
                            DurabilityQosPolicyKind.from_int(0),
                            new Duration_t(0, 0)),
View Full Code Here

            org.omg.CORBA.Object objRef = orb
                    .resolve_initial_references("NameService");
            // Use NamingContextExt which is part of the Interoperable
            // Naming Service (INS) specification.
            NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
            // resolve the Object Reference in Naming
            String rname = "DomainParticipantFactory";
            byte tab[] = new byte[1];
            tab[0] = 1;
            org.omg.dds.UserDataQosPolicy UDQP = new UserDataQosPolicy(tab);
            DomainParticipantQos DPQOS = new DomainParticipantQos(UDQP,
                    new EntityFactoryQosPolicy());
            domainpartiFactory = DomainParticipantFactoryHelper.narrow(ncRef
                    .resolve_str(rname));
            TopicQos tq = new TopicQos(
                    new TopicDataQosPolicy(tab),
                    new DurabilityQosPolicy(
                            DurabilityQosPolicyKind.from_int(0),
View Full Code Here

       
        try {
          org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
          // Use NamingContextExt which is part of the Interoperable
          // Naming Service (INS) specification.
          NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
          // resolve the Object Reference in Naming
          String rname = "DomainParticipantFactory";
          byte tab[ ] = new byte [1];
          tab[0] = 1 ;
          org.omg.dds.UserDataQosPolicy UDQP  = new UserDataQosPolicy(tab);
          DomainParticipantQos DPQOS = new DomainParticipantQos(UDQP,new EntityFactoryQosPolicy()) ;
          domainpartiFactory = DomainParticipantFactoryHelper.narrow(ncRef.resolve_str(rname));
          TopicQos tq = new TopicQos(new TopicDataQosPolicy(tab),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.TransportPriorityQosPolicy(0),new org.omg.dds.LifespanQosPolicy (new Duration_t(0,0)),new org.omg.dds.OwnershipQosPolicy(org.omg.dds.OwnershipQosPolicyKind.from_int(0)));
          domainparticipant = domainpartiFactory.create_participant(0,DPQOS,null);
          topic = domainparticipant.create_topic("messsage","demo.dds.dcps.temperaturesample.Message",tq ,null);
         
          String  st  [] = new String [1];
View Full Code Here

        this.orb = orb;
        this.poa = poa ;
       
        try
        {                       
            NamingContextExt nc =NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));           
            e = EventChannelHelper.narrow(nc.resolve( nc.to_name("eventchannel")));
            supplierAdmin = e.for_suppliers();
            proxyPushConsumer = supplierAdmin.obtain_push_consumer();
            proxyPushConsumer.connect_push_supplier( _this(orb) );                                  
        }
        catch(Exception ex)
View Full Code Here

    public DomainParticipantFactoryImpl(org.omg.CORBA.ORB orb,
            org.omg.PortableServer.POA poa) {
        this.orb = orb;
        this.poa = poa;
        try {
            NamingContextExt nc = NamingContextExtHelper.narrow(orb
                    .resolve_initial_references("NameService"));
            EventChannelImpl channel = new EventChannelImpl(orb, poa);
            org.omg.CORBA.Object o = poa.servant_to_reference(channel);
            /* event channel used by event service */
            nc.rebind(nc.to_name("eventchannel"), o);
        } catch (Exception e) {

        }
        allParticipant = new Vector();
        /* thread send message for all suscriber */
 
View Full Code Here

       
        try
        {                      
            this.orb = orb;
            this.poa = poa;
            NamingContextExt nc =  NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));
            ecs = EventChannelHelper.narrow(nc.resolve(nc.to_name("eventchannel")));
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

                return ref;
            org.omg.CORBA.Object objRef = orb
                    .resolve_initial_references("NameService");
            // Use NamingContextExt which is part of the Interoperable
            // Naming Service (INS) specification.
            NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
            // get object reference from the servant (and implicitly register
            // it)
            org.omg.CORBA.Object oref = poa.servant_to_reference(impl);
            ref = org.omg.dds.DomainParticipantHelper.narrow(oref);

            if (ncRef != null) {
                // bind the Object Reference in Naming
                NameComponent path[] = ncRef.to_name(new Integer(domainId)
                        .toString());
                ncRef.rebind(path, ref);
                allParticipant.add(ref);
                Consummer.add(ref);
            }
        } catch (Exception e) {
        }
View Full Code Here

TOP

Related Classes of org.omg.CosNaming.NamingContextExt

Copyright © 2018 www.massapicom. 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.