Package javax.naming

Examples of javax.naming.NotContextException


            throw new OperationNotSupportedException();
        } else if (obj instanceof DirContext) {
            return ((DirContext) obj).search("", arg1, arg2, arg3); //$NON-NLS-1$
        } else {
            // jndi.4A=found object is not a DirContext
            throw new NotContextException(Messages.getString("jndi.4A"))//$NON-NLS-1$
        }
    }
View Full Code Here


        if (o == this) {
            return new ListEnumeration();
        } else if (o instanceof Context) {
            return ((Context)o).list("");
        } else {
            throw new NotContextException();
        }
    }
View Full Code Here

        if (o == this) {
            return new ListBindingEnumeration();
        } else if (o instanceof Context) {
            return ((Context)o).listBindings("");
        } else {
            throw new NotContextException();
        }
    }
View Full Code Here

        if (o == this) {
            return new ListEnumeration();
        } else if (o instanceof Context) {
            return ((Context)o).list("");
        } else {
            throw new NotContextException();
        }
    }
View Full Code Here

        if (o == this) {
            return new ListBindingEnumeration();
        } else if (o instanceof Context) {
            return ((Context)o).listBindings("");
        } else {
            throw new NotContextException();
        }
    }
View Full Code Here

        } else {
            if (entry.type == NamingEntry.CONTEXT) {
                ((Context) entry.value).close();
                bindings.remove(name.get(0));
            } else {
                throw new NotContextException
                    (sm.getString("namingContext.contextExpected"));
            }
        }
       
    }
View Full Code Here

        if (name.size() > 1) {
            Object obj = bindings.get(name.get(0));
            if (obj instanceof Context) {
                return ((Context) obj).getNameParser(name.getSuffix(1));
            } else {
                throw new NotContextException
                    (sm.getString("namingContext.contextExpected"));
            }
        }

        return nameParser;
View Full Code Here

        } else {
            if (entry.type == NamingEntry.CONTEXT) {
                ((Context) entry.value).close();
                bindings.remove(name.get(0));
            } else {
                throw new NotContextException
                    (sm.getString("namingContext.contextExpected"));
            }
        }
       
    }
View Full Code Here

        if (name.size() > 1) {
            Object obj = bindings.get(name.get(0));
            if (obj instanceof Context) {
                return ((Context) obj).getNameParser(name.getSuffix(1));
            } else {
                throw new NotContextException
                    (sm.getString("namingContext.contextExpected"));
            }
        }

        return nameParser;
View Full Code Here

    rename(oldName.toString(), newName.toString());
  }

  public NamingEnumeration list(String name) throws NamingException {
    if (name.length() > 0)
      throw new NotContextException("Subcontexts not supported");
       
    final Iterator i = getCurrentBindings().iterator();
    return new NamingEnumeration() {
      public void close() {}
      public boolean hasMore() {
View Full Code Here

TOP

Related Classes of javax.naming.NotContextException

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.