Package javax.naming.spi

Examples of javax.naming.spi.ResolveResult


    public NamingEnumeration<SearchResult> search(String name,
        Attributes matchingAttributes,
        String[] attributesToReturn)
        throws NamingException {
            ResolveResult res = getRootURLContext(name, myEnv);
            DirContext ctx = (DirContext)res.getResolvedObj();
            try {
                return ctx.search(res.getRemainingName(),
                    matchingAttributes, attributesToReturn);
            } finally {
                ctx.close();
            }
    }
View Full Code Here


    public NamingEnumeration<SearchResult> search(String name,
        String filter,
        SearchControls cons)
        throws NamingException {
            ResolveResult res = getRootURLContext(name, myEnv);
            DirContext ctx = (DirContext)res.getResolvedObj();
            try {
                return ctx.search(res.getRemainingName(), filter, cons);
            } finally {
                ctx.close();
            }
    }
View Full Code Here

    public NamingEnumeration<SearchResult> search(String name,
        String filterExpr,
        Object[] filterArgs,
        SearchControls cons)
        throws NamingException {
            ResolveResult res = getRootURLContext(name, myEnv);
            DirContext ctx = (DirContext)res.getResolvedObj();
            try {
                return
                    ctx.search(res.getRemainingName(), filterExpr, filterArgs, cons);
            } finally {
                ctx.close();
            }
    }
View Full Code Here

        //                 " objName=" + remaining.toString() + "\n");

        // Create a registry context.
        Context regCtx = new RegistryContext(host, port, env);

        return (new ResolveResult(regCtx, remaining));
    }
View Full Code Here

        cpe.setEnvironment(myEnv);
        return NamingManager.getContinuationContext(cpe);
    }

    public Object lookup(String name) throws NamingException {
        ResolveResult res = getRootURLContext(name, myEnv);
        Context ctx = (Context)res.getResolvedObj();
        try {
            return ctx.lookup(res.getRemainingName());
        } finally {
            ctx.close();
        }
    }
View Full Code Here

            }
        }
    }

    public void bind(String name, Object obj) throws NamingException {
        ResolveResult res = getRootURLContext(name, myEnv);
        Context ctx = (Context)res.getResolvedObj();
        try {
            ctx.bind(res.getRemainingName(), obj);
        } finally {
            ctx.close();
        }
    }
View Full Code Here

            }
        }
    }

    public void rebind(String name, Object obj) throws NamingException {
        ResolveResult res = getRootURLContext(name, myEnv);
        Context ctx = (Context)res.getResolvedObj();
        try {
            ctx.rebind(res.getRemainingName(), obj);
        } finally {
            ctx.close();
        }
    }
View Full Code Here

            }
        }
    }

    public void unbind(String name) throws NamingException {
        ResolveResult res = getRootURLContext(name, myEnv);
        Context ctx = (Context)res.getResolvedObj();
        try {
            ctx.unbind(res.getRemainingName());
        } finally {
            ctx.close();
        }
    }
View Full Code Here

            throw new OperationNotSupportedException(
                "Renaming using different URL prefixes not supported : " +
                oldName + " " + newName);
        }

        ResolveResult res = getRootURLContext(oldName, myEnv);
        Context ctx = (Context)res.getResolvedObj();
        try {
            ctx.rename(res.getRemainingName(), getURLSuffix(newPrefix, newName));
        } finally {
            ctx.close();
        }
    }
View Full Code Here

            }
        }
    }

    public NamingEnumeration<NameClassPair> list(String name)   throws NamingException {
        ResolveResult res = getRootURLContext(name, myEnv);
        Context ctx = (Context)res.getResolvedObj();
        try {
            return ctx.list(res.getRemainingName());
        } finally {
            ctx.close();
        }
    }
View Full Code Here

TOP

Related Classes of javax.naming.spi.ResolveResult

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.