Package org.omg.CosNaming.NamingContextPackage

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName


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

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

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

        Name n = new Name(nc);
View Full Code Here


    public NamingContext bind_new_context(NameComponent[] nc) throws NotFound, CannotProceed, InvalidName, AlreadyBound {
        if (this.destroyed)
            throw new CannotProceed();

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

        NamingContext context = new_context();
        if (context == null)
            throw new CannotProceed();
View Full Code Here

    public void rebind(NameComponent[] nc, org.omg.CORBA.Object obj) throws NotFound, CannotProceed, InvalidName {
        if (this.destroyed)
            throw new CannotProceed();

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

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

        Name n = new Name(nc);
View Full Code Here

    public void rebind_context(NameComponent[] nc, NamingContext obj) throws NotFound, CannotProceed, InvalidName {
        if (this.destroyed)
            throw new CannotProceed();

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

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

        Name n = new Name(nc);
View Full Code Here

    public org.omg.CORBA.Object resolve(NameComponent[] nc) throws NotFound, CannotProceed, InvalidName {
        if (this.destroyed)
            throw new CannotProceed();

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

        Name n = new Name(nc[0]);
        if (nc.length > 1) {
            org.omg.CORBA.Object next_context = (org.omg.CORBA.Object) this.contexts.get(n);
            if ((next_context == null) || (isDead(next_context)))
View Full Code Here

    public void unbind(NameComponent[] nc) throws NotFound, CannotProceed, InvalidName {
        if (this.destroyed)
            throw new CannotProceed();

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

        Name n = new Name(nc);
        Name ctx = n.ctxName();
        NameComponent nb = n.baseNameComponent();
View Full Code Here

     */
    public org.omg.CosNaming.NameComponent[] to_name(String sn)
        throws org.omg.CosNaming.NamingContextPackage.InvalidName {
        // must have a argument to parse
        if (sn == null || sn.length() == 0) {
            throw new InvalidName();
        }

        List components = new ArrayList();

        StringBuffer component = new StringBuffer();

        int index = 0;
        String id = null;
        String kind = null;
        while (index < sn.length()) {
            char ch = sn.charAt(index++);

            // found an escape character or a delimiter?
            if (ch == '\\') {
                // nothing after the escape?  Trouble
                if (index >= sn.length()) {
                    throw new InvalidName();
                }
                // get the next character
                ch = sn.charAt(index++);
                component.append(ch);
            }
            // we need to process the periods here, to avoid getting
            // mixed up with unescaped periods.
            else if (ch == '.') {
                // already seen a period while scanning?  That's not allowed
                if (id != null) {
                    throw new InvalidName();
                }
                // pull off the id piece and reset the buffer
                id = component.toString();
                component.setLength(0);
            }
View Full Code Here

        if (addr == null || addr.length() == 0) {
            throw new InvalidAddress();
        }

        if (sn == null || sn.length() == 0) {
            throw new InvalidName();
        }

        // TODO:  What validation, if any, needs to be done here?
        return "corbaname:" + addr + "#" + encodeRFC2396Name(sn);
    }
View Full Code Here

            throw new BAD_PARAM(27 | org.omg.CORBA.OMGVMCID.value, CompletionStatus.COMPLETED_NO);
        }

        // Valid name?
        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

     */
    public org.omg.CosNaming.NameComponent[] to_name(String sn)
        throws org.omg.CosNaming.NamingContextPackage.InvalidName {
        // must have a argument to parse
        if (sn == null || sn.length() == 0) {
            throw new InvalidName();
        }

        List components = new ArrayList();

        StringBuffer component = new StringBuffer();

        int index = 0;
        String id = null;
        String kind = null;
        while (index < sn.length()) {
            char ch = sn.charAt(index++);

            // found an escape character or a delimiter?
            if (ch == '\\') {
                // nothing after the escape?  Trouble
                if (index >= sn.length()) {
                    throw new InvalidName();
                }
                // get the next character
                ch = sn.charAt(index++);
                component.append(ch);
            }
            // we need to process the periods here, to avoid getting
            // mixed up with unescaped periods.
            else if (ch == '.') {
                // already seen a period while scanning?  That's not allowed
                if (id != null) {
                    throw new InvalidName();
                }
                // pull off the id piece and reset the buffer
                id = component.toString();
                component.setLength(0);
            }
View Full Code Here

TOP

Related Classes of org.omg.CosNaming.NamingContextPackage.InvalidName

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.