Package org.omg.CosNaming

Examples of org.omg.CosNaming.Binding


    {
        // Create a key and a value
        InternalBindingKey key = new InternalBindingKey(n);
        NameComponent[] name = new NameComponent[1];
        name[0] = n;
        Binding b = new Binding(name,bt);
        InternalBindingValue value = new InternalBindingValue(b,null);
        value.theObjectRef = obj;
        // insert it
        InternalBindingValue oldValue =
            (InternalBindingValue)this.theHashtable.put(key,value);
View Full Code Here


         */
        public boolean next_one(org.omg.CosNaming.BindingHolder b) {
            if (iterator.hasNext()) {
                // return this as a Binding value.
                BoundObject obj = (BoundObject)iterator.next();
                b.value = new Binding(new NameComponent[] {obj.name}, obj.type);
                return true;
            } else {
                // return an empty element
                b.value = new Binding(new NameComponent[0], BindingType.nobject);
                return false;
            }
        }
View Full Code Here

    NamingContextExt nc = NamingContextExtHelper.narrow(orb
        .resolve_initial_references("NameService"));
    BindingListHolder bl = new BindingListHolder();
    BindingIteratorHolder blIt = new BindingIteratorHolder();
    nc.list(1000, bl, blIt);
    Binding bindings[] = bl.value;
    List<String> toResolve = new ArrayList<String>();
    toResolve.add("TransactionManagerService");
    for (int i = 0; i < bindings.length; i++) {

      int lastIx = bindings[i].binding_name.length - 1;
View Full Code Here

            int how_many_ctr = how_many;

            // set up an array with "how_many" bindings
            result = new Binding[how_many];
            for (; names.hasNext() && how_many_ctr > 0; how_many_ctr--)
                result[how_many_ctr - 1] = new Binding((names.next()).components(), BindingType.nobject);

            for (; contexts.hasNext() && how_many_ctr > 0; how_many_ctr--)
                result[how_many_ctr - 1] = new Binding((contexts.next()).components(), BindingType.ncontext);

            // create a new BindingIterator for the remaining arrays
            size -= how_many;
            Binding[] rest = new Binding[size];
            for (; names.hasNext() && size > 0; size--)
                rest[size - 1] = new Binding((names.next()).components(), BindingType.nobject);

            for (; contexts.hasNext() && size > 0; size--)
                rest[size - 1] = new Binding((contexts.next()).components(), BindingType.ncontext);

            org.omg.CORBA.Object o;
            try {
                // Iterators are activated with the RootPOA (transient)
                byte[] oid = rootPoa.activate_object(new BindingIteratorImpl(rest));
                o = rootPoa.id_to_reference(oid);
            } catch (Exception e) {
                JacORBLogger.ROOT_LOGGER.logInternalError(e);
                throw new INTERNAL(e.toString());
            }

            bi.value = BindingIteratorHelper.narrow(o);
        } else {
            result = new Binding[size];
            for (; names.hasNext() && size > 0; size--)
                result[size - 1] = new Binding((names.next()).components(), BindingType.nobject);

            for (; contexts.hasNext() && size > 0; size--)
                result[size - 1] = new Binding((contexts.next()).components(), BindingType.ncontext);
        }

        bl.value = result;
    }
View Full Code Here

            b.value =
                ((InternalBindingValue)theEnumeration.nextElement()).theBinding;
            currentSize--;
        } else {
            // Return empty but marshalable binding
            b.value = new Binding(new NameComponent[0],BindingType.nobject);
        }
        return hasMore;
    }
View Full Code Here

    {
        // Create a key and a value
        InternalBindingKey key = new InternalBindingKey(n);
        NameComponent[] name = new NameComponent[1];
        name[0] = n;
        Binding b = new Binding(name,bt);
        InternalBindingValue value = new InternalBindingValue(b,null);
        value.theObjectRef = obj;
        // insert it
        InternalBindingValue oldValue =
            (InternalBindingValue)this.theHashtable.put(key,value);
View Full Code Here

            NameComponent[] nlist = new NameComponent[1];
            nlist[0] = n;
            BindingType theType = theElement.theBindingType;

            b.value =
                new Binding( nlist, theType );
        } else {
            // Return empty but marshalable binding
            b.value = new Binding(new NameComponent[0],BindingType.nobject);
        }
        return hasMore;
    }
View Full Code Here

         */
        public boolean next_one(org.omg.CosNaming.BindingHolder b) {
            if (iterator.hasNext()) {
                // return this as a Binding value.
                BoundObject obj = (BoundObject)iterator.next();
                b.value = new Binding(new NameComponent[] {obj.name}, obj.type);
                return true;
            } else {
                // return an empty element
                b.value = new Binding(new NameComponent[0], BindingType.nobject);
                return false;
            }
        }
View Full Code Here

         */
        public boolean next_one(org.omg.CosNaming.BindingHolder b) {
            if (iterator.hasNext()) {
                // return this as a Binding value.
                BoundObject obj = (BoundObject)iterator.next();
                b.value = new Binding(new NameComponent[] {obj.name}, obj.type);
                return true;
            } else {
                // return an empty element
                b.value = new Binding(new NameComponent[0], BindingType.nobject);
                return false;
            }
        }
View Full Code Here

        result = new Binding[how_many];
        for( ; n.hasMoreElements() && how_many > 0; how_many-- )
        {
            result[how_many-1] =
                new Binding(((Name)n.nextElement()).components(),
                            BindingType.nobject );
        }

        for( ; c.hasMoreElements() && how_many > 0; how_many-- )
        {
            result[how_many-1] =
                new Binding(((Name)c.nextElement()).components(),
                            BindingType.ncontext);
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of org.omg.CosNaming.Binding

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.