Package org.omg.CosNaming

Examples of org.omg.CosNaming.NameComponent


        if (obj == null)
            throw new org.omg.CORBA.BAD_PARAM();

        Name n = new Name(nc);
        Name ctx = n.ctxName();
        NameComponent nb = n.baseNameComponent();

        if (ctx == null) {
            // the name is bound, but it is bound to an object - the client should have been using rebind().
            if (this.names.containsKey(n))
                throw new NotFound(NotFoundReason.not_context, new NameComponent[]{nb});
View Full Code Here


        if (nc == null || nc.length == 0)
            throw new InvalidName();

        Name n = new Name(nc);
        Name ctx = n.ctxName();
        NameComponent nb = n.baseNameComponent();

        if (ctx == null) {
            if (this.names.containsKey(n)) {
                org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.names.remove(n);
                ref._release();
View Full Code Here

        // This test is not foolproof because some name servers
        // always just return one component in rest_of_name
        // so you might not be able to tell whether that is
        // the leaf (e.g. aa/aa/aa, which one is missing?)

        NameComponent rest;
        return e.why.value() == NotFoundReason._missing_node &&
                e.rest_of_name.length == 1 &&
                (rest = e.rest_of_name[0]).id.equals(leaf.id) &&
                (rest.kind == leaf.kind ||
                        (rest.kind != null && rest.kind.equals(leaf.kind)));
View Full Code Here

                        kind[kindCount++] = str.charAt(i++);
                    }
                }
            }
            components.addElement(stringifyComponent(
                    new NameComponent(new String(id, 0, idCount),
                            new String(kind, 0, kindCount))));

            if (i < len) {
                ++i; // skip separator
            }
View Full Code Here

    /**
     * Return a NameComponent given its stringified form.
     */
    private static NameComponent parseComponent(String compStr)
            throws InvalidNameException {
        NameComponent comp = new NameComponent();
        int kindSep = -1;
        int len = compStr.length();

        int j = 0;
        char[] newStr = new char[len];
View Full Code Here

     */
    private SerialContextProvider narrowProvider(org.omg.CORBA.Object ref)
                       throws Exception {

        NamingContext nctx = NamingContextHelper.narrow(ref);
  NameComponent[] path = { new NameComponent("SerialContextProvider", "") };
  return (SerialContextProvider)
        PortableRemoteObject.narrow(nctx.resolve(path),
            SerialContextProvider.class);
    }
View Full Code Here

           
            // put object in NameService
            org.omg.CORBA.Object objRef =
                ORBManager.getORB().resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc =
                new NameComponent(SERIAL_CONTEXT_PROVIDER_NAME, "");
            NameComponent path[] = {nc};
            ncRef.rebind(path, provider);

        } catch (Exception ex) {

            _logger.log(Level.SEVERE,
View Full Code Here

      org.omg.CORBA.Object obj = orb.string_to_object(ior);

      // obtain naming context for WebLogic Server
      NamingContext nc = NamingContextHelper.narrow(obj);

      NameComponent nComp = new NameComponent(rmiObj, "");
      NameComponent path[] = {nComp};
      try {
        // resolve and narrow to RMI object
        obj = nc.resolve(path);
        HelloWorld hi = HelloWorldHelper.narrow(obj);
View Full Code Here

                objref = orb.string_to_object(endpoints) ;
            }

            final NamingContext nctx = NamingContextHelper.narrow(objref);
            final NameComponent[] path =
                { new NameComponent("SerialContextProvider", "") };
            final org.omg.CORBA.Object obj = nctx.resolve(path) ;

            SerialContextProvider result =
                (SerialContextProvider)PortableRemoteObject.narrow( obj,
                    SerialContextProvider.class );
View Full Code Here

                id = "";
        }
        if( kind == null ) {
                kind = "";
        }
        return new NameComponent( id, kind );
   }
View Full Code Here

TOP

Related Classes of org.omg.CosNaming.NameComponent

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.