Package org.omg.CosNaming

Examples of org.omg.CosNaming.NameComponent


            NameComponent[] subName = extractSubName(n);

            // now pass this along to the next context for the real bind operation.
            return context.resolve(subName);
        } else {
            NameComponent name = n[0];
            // see if we have this bound already...can't replace these.
            BindingTypeHolder type = new BindingTypeHolder();
            org.omg.CORBA.Object obj = resolveObject(name, type);
            if (obj == null) {
                // Object was not found
View Full Code Here


            NameComponent[] subName = extractSubName(n);

            // now pass this along to the next context for the real bind operation.
            context.unbind(subName);
        } else {
            NameComponent name = n[0];
            synchronized (this) {
                // see if we have this bound already...can't replace these.
                BindingTypeHolder type = new BindingTypeHolder();
                org.omg.CORBA.Object obj = unbindObject(name);
                if (obj == null) {
View Full Code Here

                } else {
                    // we have an id already, pull off the kind
                    kind = component.toString();
                }
                // add the parsed name component
                components.add(new NameComponent(id, kind));
                // make sure these are all reset after pulling off a component
                component.setLength(0);
                id = null;
                kind = null;
            } else {
                component.append(ch);
            }
        }

        // parse the last section
        // not seen a id/kind separator yet?  This is an id with no kind
        if (id == null) {
            id = component.toString();
            kind = "";
        } else {
            // we have an id already, pull off the kind
            kind = component.toString();
        }
        // add the parsed name component
        components.add(new NameComponent(id, kind));

        // and turn this into a component array
        return (NameComponent[])components.toArray(new NameComponent[components.size()]);
    }
View Full Code Here

        if (n.length < 1) {
            throw new InvalidName();
        }

        // we have at least one name, so validate the toplevel item
        NameComponent name = n[0];

        // more name validation
        if (name.id.length() == 0 && name.kind.length() == 0) {
            throw new InvalidName();
        }
View Full Code Here

    log.debug(" finished & returning from ConnectToORBWithNameServiceProp");

    try {
      log.debug(" creating NamingContext");
      NameComponent[] aNameComponentArray = new NameComponent[1];
      aNameComponentArray[0] = new NameComponent(namingContextExt, "");
      nc = nce.bind_new_context(aNameComponentArray);
      log.debug(" created NamingContext");
    } catch (AlreadyBound e) {
      log.debug("Could not create the context");
    }
View Full Code Here

    private void bindObject(String name, org.omg.CORBA.Object object) throws Exception {
        ORB orb = server.getORB();
        org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
        NamingContext ncRef = NamingContextHelper.narrow(objRef);
        NameComponent nc = new NameComponent(name, "");
        NameComponent path[] = {nc};
        ncRef.rebind(path, object);
    }
View Full Code Here

        // component that failed, not *rest* as advertized. This is useless
        // because what if you have something like aa/aa/aa/aa/aa.
        // If one of those is not found, you get "aa" as 'rest'.
        if (rest.length == 1 && inputName != null) {
            // Check that we're not talking to 1.2/1.3 Sun tnameserv
            NameComponent lastIn = inputName[inputName.length - 1];
            if (rest[0].id.equals(lastIn.id) &&
                    rest[0].kind != null &&
                    rest[0].kind.equals(lastIn.kind)) {
                // Might be legit
            } else {
View Full Code Here

        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) {
            if (this.names.containsKey(n)) {
                // if the name is still in use, try to ping the object
                org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.names.get(n);
View Full Code Here

        if (this.destroyed)
            throw new CannotProceed();

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

        if (ctx == null) {
            if (this.names.containsKey(n)) {
                // if the name is still in use, try to ping the object
                org.omg.CORBA.Object ref = (org.omg.CORBA.Object) this.names.get(n);
View Full Code Here

        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 a context - the client should have been using rebind_context!
            if (this.contexts.containsKey(n))
                throw new NotFound(NotFoundReason.not_object, new NameComponent[]{nb});
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.