home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / naming / spi / ContinuationContext.class (.txt) next >
Encoding:
Java Class File  |  1979-12-31  |  4.3 KB  |  209 lines

  1. package javax.naming.spi;
  2.  
  3. import java.util.Hashtable;
  4. import javax.naming.CannotProceedException;
  5. import javax.naming.Context;
  6. import javax.naming.Name;
  7. import javax.naming.NameParser;
  8. import javax.naming.NamingEnumeration;
  9. import javax.naming.NamingException;
  10.  
  11. class ContinuationContext implements Context, Resolver {
  12.    protected CannotProceedException cpe;
  13.    protected Context contCtx = null;
  14.  
  15.    protected ContinuationContext(CannotProceedException var1) {
  16.       this.cpe = var1;
  17.    }
  18.  
  19.    protected Context getTargetContext() throws NamingException {
  20.       if (this.contCtx == null) {
  21.          if (this.cpe.getResolvedObj() == null) {
  22.             throw (NamingException)this.cpe.fillInStackTrace();
  23.          }
  24.  
  25.          this.contCtx = NamingManager.getContext(this.cpe.getResolvedObj(), this.cpe.getAltName(), this.cpe.getAltNameCtx(), this.cpe.getEnvironment());
  26.          if (this.contCtx == null) {
  27.             throw (NamingException)this.cpe.fillInStackTrace();
  28.          }
  29.       }
  30.  
  31.       return this.contCtx;
  32.    }
  33.  
  34.    public Object lookup(Name var1) throws NamingException {
  35.       Context var2 = this.getTargetContext();
  36.       return var2.lookup(var1);
  37.    }
  38.  
  39.    public Object lookup(String var1) throws NamingException {
  40.       Context var2 = this.getTargetContext();
  41.       return var2.lookup(var1);
  42.    }
  43.  
  44.    public void bind(Name var1, Object var2) throws NamingException {
  45.       Context var3 = this.getTargetContext();
  46.       var3.bind(var1, var2);
  47.    }
  48.  
  49.    public void bind(String var1, Object var2) throws NamingException {
  50.       Context var3 = this.getTargetContext();
  51.       var3.bind(var1, var2);
  52.    }
  53.  
  54.    public void rebind(Name var1, Object var2) throws NamingException {
  55.       Context var3 = this.getTargetContext();
  56.       var3.rebind(var1, var2);
  57.    }
  58.  
  59.    public void rebind(String var1, Object var2) throws NamingException {
  60.       Context var3 = this.getTargetContext();
  61.       var3.rebind(var1, var2);
  62.    }
  63.  
  64.    public void unbind(Name var1) throws NamingException {
  65.       Context var2 = this.getTargetContext();
  66.       var2.unbind(var1);
  67.    }
  68.  
  69.    public void unbind(String var1) throws NamingException {
  70.       Context var2 = this.getTargetContext();
  71.       var2.unbind(var1);
  72.    }
  73.  
  74.    public void rename(Name var1, Name var2) throws NamingException {
  75.       Context var3 = this.getTargetContext();
  76.       var3.rename(var1, var2);
  77.    }
  78.  
  79.    public void rename(String var1, String var2) throws NamingException {
  80.       Context var3 = this.getTargetContext();
  81.       var3.rename(var1, var2);
  82.    }
  83.  
  84.    public NamingEnumeration list(Name var1) throws NamingException {
  85.       Context var2 = this.getTargetContext();
  86.       return var2.list(var1);
  87.    }
  88.  
  89.    public NamingEnumeration list(String var1) throws NamingException {
  90.       Context var2 = this.getTargetContext();
  91.       return var2.list(var1);
  92.    }
  93.  
  94.    public NamingEnumeration listBindings(Name var1) throws NamingException {
  95.       Context var2 = this.getTargetContext();
  96.       return var2.listBindings(var1);
  97.    }
  98.  
  99.    public NamingEnumeration listBindings(String var1) throws NamingException {
  100.       Context var2 = this.getTargetContext();
  101.       return var2.listBindings(var1);
  102.    }
  103.  
  104.    public void destroySubcontext(Name var1) throws NamingException {
  105.       Context var2 = this.getTargetContext();
  106.       var2.destroySubcontext(var1);
  107.    }
  108.  
  109.    public void destroySubcontext(String var1) throws NamingException {
  110.       Context var2 = this.getTargetContext();
  111.       var2.destroySubcontext(var1);
  112.    }
  113.  
  114.    public Context createSubcontext(Name var1) throws NamingException {
  115.       Context var2 = this.getTargetContext();
  116.       return var2.createSubcontext(var1);
  117.    }
  118.  
  119.    public Context createSubcontext(String var1) throws NamingException {
  120.       Context var2 = this.getTargetContext();
  121.       return var2.createSubcontext(var1);
  122.    }
  123.  
  124.    public Object lookupLink(Name var1) throws NamingException {
  125.       Context var2 = this.getTargetContext();
  126.       return var2.lookupLink(var1);
  127.    }
  128.  
  129.    public Object lookupLink(String var1) throws NamingException {
  130.       Context var2 = this.getTargetContext();
  131.       return var2.lookupLink(var1);
  132.    }
  133.  
  134.    public NameParser getNameParser(Name var1) throws NamingException {
  135.       Context var2 = this.getTargetContext();
  136.       return var2.getNameParser(var1);
  137.    }
  138.  
  139.    public NameParser getNameParser(String var1) throws NamingException {
  140.       Context var2 = this.getTargetContext();
  141.       return var2.getNameParser(var1);
  142.    }
  143.  
  144.    public Name composeName(Name var1, Name var2) throws NamingException {
  145.       Context var3 = this.getTargetContext();
  146.       return var3.composeName(var1, var2);
  147.    }
  148.  
  149.    public String composeName(String var1, String var2) throws NamingException {
  150.       Context var3 = this.getTargetContext();
  151.       return var3.composeName(var1, var2);
  152.    }
  153.  
  154.    public Object addToEnvironment(String var1, Object var2) throws NamingException {
  155.       Context var3 = this.getTargetContext();
  156.       return var3.addToEnvironment(var1, var2);
  157.    }
  158.  
  159.    public Object removeFromEnvironment(String var1) throws NamingException {
  160.       Context var2 = this.getTargetContext();
  161.       return var2.removeFromEnvironment(var1);
  162.    }
  163.  
  164.    public Hashtable getEnvironment() throws NamingException {
  165.       Context var1 = this.getTargetContext();
  166.       return var1.getEnvironment();
  167.    }
  168.  
  169.    public String getNameInNamespace() throws NamingException {
  170.       Context var1 = this.getTargetContext();
  171.       return var1.getNameInNamespace();
  172.    }
  173.  
  174.    public ResolveResult resolveToClass(Name var1, Class var2) throws NamingException {
  175.       if (this.cpe.getResolvedObj() == null) {
  176.          throw (NamingException)this.cpe.fillInStackTrace();
  177.       } else {
  178.          Resolver var3 = NamingManager.getResolver(this.cpe.getResolvedObj(), this.cpe.getAltName(), this.cpe.getAltNameCtx(), this.cpe.getEnvironment());
  179.          if (var3 == null) {
  180.             throw (NamingException)this.cpe.fillInStackTrace();
  181.          } else {
  182.             return var3.resolveToClass(var1, var2);
  183.          }
  184.       }
  185.    }
  186.  
  187.    public ResolveResult resolveToClass(String var1, Class var2) throws NamingException {
  188.       if (this.cpe.getResolvedObj() == null) {
  189.          throw (NamingException)this.cpe.fillInStackTrace();
  190.       } else {
  191.          Resolver var3 = NamingManager.getResolver(this.cpe.getResolvedObj(), this.cpe.getAltName(), this.cpe.getAltNameCtx(), this.cpe.getEnvironment());
  192.          if (var3 == null) {
  193.             throw (NamingException)this.cpe.fillInStackTrace();
  194.          } else {
  195.             return var3.resolveToClass(var1, var2);
  196.          }
  197.       }
  198.    }
  199.  
  200.    public void close() throws NamingException {
  201.       this.cpe = null;
  202.       if (this.contCtx != null) {
  203.          this.contCtx.close();
  204.          this.contCtx = null;
  205.       }
  206.  
  207.    }
  208. }
  209.