FileDocCategorySizeDatePackage
ContinuationContext.javaAPI DocJava SE 5 API6296Fri Aug 26 14:57:42 BST 2005javax.naming.spi

ContinuationContext

public class ContinuationContext extends Object implements Context, Resolver
This class is for dealing with federations/continuations.
author
Rosanna Lee
author
Scott Seligman
version
1.9 04/05/05
since
1.3

Fields Summary
protected CannotProceedException
cpe
protected Hashtable
env
protected Context
contCtx
Constructors Summary
protected ContinuationContext(CannotProceedException cpe, Hashtable env)


      
			  
	this.cpe = cpe;
	this.env = env;
    
Methods Summary
public java.lang.ObjectaddToEnvironment(java.lang.String propName, java.lang.Object value)

	Context ctx = getTargetContext();
	return ctx.addToEnvironment(propName, value);
    
public voidbind(javax.naming.Name name, java.lang.Object newObj)

	Context ctx = getTargetContext();
	ctx.bind(name, newObj);
    
public voidbind(java.lang.String name, java.lang.Object newObj)

	Context ctx = getTargetContext();
	ctx.bind(name, newObj);
    
public voidclose()

	cpe = null;
	env = null;
	if (contCtx != null) {
	    contCtx.close();
	    contCtx = null;
	}
    
public javax.naming.NamecomposeName(javax.naming.Name name, javax.naming.Name prefix)

	Context ctx = getTargetContext();
	return ctx.composeName(name, prefix);
    
public java.lang.StringcomposeName(java.lang.String name, java.lang.String prefix)

	Context ctx = getTargetContext();
	return ctx.composeName(name, prefix);
    
public javax.naming.ContextcreateSubcontext(javax.naming.Name name)

	Context ctx = getTargetContext();
	return ctx.createSubcontext(name);
    
public javax.naming.ContextcreateSubcontext(java.lang.String name)

	Context ctx = getTargetContext();
	return ctx.createSubcontext(name);
    
public voiddestroySubcontext(javax.naming.Name name)

	Context ctx = getTargetContext();
	ctx.destroySubcontext(name);
    
public voiddestroySubcontext(java.lang.String name)

	Context ctx = getTargetContext();
	ctx.destroySubcontext(name);
    
public java.util.HashtablegetEnvironment()

	Context ctx = getTargetContext();
	return ctx.getEnvironment();
    
public java.lang.StringgetNameInNamespace()

	Context ctx = getTargetContext();
	return ctx.getNameInNamespace();
    
public javax.naming.NameParsergetNameParser(javax.naming.Name name)

	Context ctx = getTargetContext();
	return ctx.getNameParser(name);
    
public javax.naming.NameParsergetNameParser(java.lang.String name)

	Context ctx = getTargetContext();
	return ctx.getNameParser(name);
    
protected javax.naming.ContextgetTargetContext()

	if (contCtx == null) {
	    if (cpe.getResolvedObj() == null)
		throw (NamingException)cpe.fillInStackTrace();

	    contCtx = NamingManager.getContext(cpe.getResolvedObj(),
					       cpe.getAltName(),
					       cpe.getAltNameCtx(),
					       env);
	    if (contCtx == null)
		throw (NamingException)cpe.fillInStackTrace();
	}
	return contCtx;
    
public javax.naming.NamingEnumerationlist(javax.naming.Name name)

	Context ctx = getTargetContext();
	return ctx.list(name);
    
public javax.naming.NamingEnumerationlist(java.lang.String name)

	Context ctx = getTargetContext();
	return ctx.list(name);
    
public javax.naming.NamingEnumerationlistBindings(javax.naming.Name name)

	Context ctx = getTargetContext();
	return ctx.listBindings(name);
    
public javax.naming.NamingEnumerationlistBindings(java.lang.String name)

	Context ctx = getTargetContext();
	return ctx.listBindings(name);
    
public java.lang.Objectlookup(javax.naming.Name name)

	Context ctx = getTargetContext();
	return ctx.lookup(name);
    
public java.lang.Objectlookup(java.lang.String name)

	Context ctx = getTargetContext();
	return ctx.lookup(name);
    
public java.lang.ObjectlookupLink(javax.naming.Name name)

	Context ctx = getTargetContext();
	return ctx.lookupLink(name);
    
public java.lang.ObjectlookupLink(java.lang.String name)

	Context ctx = getTargetContext();
	return ctx.lookupLink(name);
    
public voidrebind(javax.naming.Name name, java.lang.Object newObj)

	Context ctx = getTargetContext();
	ctx.rebind(name, newObj);
    
public voidrebind(java.lang.String name, java.lang.Object newObj)

	Context ctx = getTargetContext();
	ctx.rebind(name, newObj);
    
public java.lang.ObjectremoveFromEnvironment(java.lang.String propName)

	Context ctx = getTargetContext();
	return ctx.removeFromEnvironment(propName);
    
public voidrename(javax.naming.Name name, javax.naming.Name newName)

	Context ctx = getTargetContext();
	ctx.rename(name, newName);
    
public voidrename(java.lang.String name, java.lang.String newName)

	Context ctx = getTargetContext();
	ctx.rename(name, newName);
    
public javax.naming.spi.ResolveResultresolveToClass(javax.naming.Name name, java.lang.Class contextType)

	if (cpe.getResolvedObj() == null)
	    throw (NamingException)cpe.fillInStackTrace();

	Resolver res = NamingManager.getResolver(cpe.getResolvedObj(),
						 cpe.getAltName(),
						 cpe.getAltNameCtx(),
						 env);
	if (res == null)
	    throw (NamingException)cpe.fillInStackTrace();
	return res.resolveToClass(name, contextType);
    
public javax.naming.spi.ResolveResultresolveToClass(java.lang.String name, java.lang.Class contextType)

	if (cpe.getResolvedObj() == null)
	    throw (NamingException)cpe.fillInStackTrace();

	Resolver res = NamingManager.getResolver(cpe.getResolvedObj(),
						 cpe.getAltName(),
						 cpe.getAltNameCtx(),
						 env);
	if (res == null)
	    throw (NamingException)cpe.fillInStackTrace();
	return res.resolveToClass(name, contextType);
    
public voidunbind(java.lang.String name)

	Context ctx = getTargetContext();
	ctx.unbind(name);
    
public voidunbind(javax.naming.Name name)

	Context ctx = getTargetContext();
	ctx.unbind(name);