Examples of InvalidName


Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

    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

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

    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

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

     * @exception org.omg.CosNaming.NamingContextPackage.InvalidName
     */
    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

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

        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

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

            throw new BAD_PARAM(MinorCodes.MinorObjectIsNull, 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

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

    public Name(NameComponent[] n)
    throws InvalidName
    {
    if( n == null || n.length == 0 )
        throw new InvalidName();

    fullName = n;
    baseName = n[ n.length-1 ];
    if( n.length > 1 )
    {
View Full Code Here

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

                // Escaped character

                i++;
                if (i >= len)
                {
                    throw new InvalidName ();
                }
            ch = sn.charAt (i);
            }
            else if (ch == '.')
            {
                // id/kind separator character

                if (inKind)
                {
                    throw new InvalidName ();
                }
                inKind = true;
                continue;
            }
            if (inKind)
View Full Code Here

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

    public static org.omg.CosNaming.NameComponent[] toName( String sn )
    throws org.omg.CosNaming.NamingContextPackage.InvalidName
    {
    if( sn == null || sn.length() == 0 || sn.startsWith("/"))
        throw new InvalidName();

    Vector v = new Vector();

    int start = 0;
    int i = 0;
    for( ; i < sn.length(); i++ )
    {
        if( sn.charAt(i) == '/' && sn.charAt(i-1) != '\\')
        {
        if( i-start == 0 )
            throw new InvalidName();
        v.addElement( getComponent( sn.substring( start, i )));
        start = i+1;
        }
    }
    if( start < i )
View Full Code Here

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

    {
        if( 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

Examples of org.omg.CosNaming.NamingContextPackage.InvalidName

    {
        if( 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
TOP
Copyright © 2018 www.massapi.com. 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.