home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / LoaderHandler.java < prev    next >
Text File  |  1997-05-20  |  2KB  |  63 lines

  1. /*
  2.  * @(#)LoaderHandler.java    1.4 97/02/11
  3.  * 
  4.  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion 1.1_beta
  20.  */
  21.  
  22. package java.rmi.server;
  23.  
  24. import java.net.MalformedURLException;
  25. import java.net.URL;
  26.  
  27. public interface LoaderHandler {
  28.     /**
  29.      * Find loader handler package prefix: assumes that the implementation of
  30.      * the LoaderHandler class is located in the package defined by the
  31.      * prefix.
  32.      */
  33.     final static String packagePrefix =
  34.     System.getProperty("java.rmi.loader.packagePrefix", "sun.rmi.server");
  35.  
  36.     /**
  37.      * Load class using java.rmi.server.codebase property.
  38.      *
  39.      * @exception java.lang.ClassNotFoundException if the class could not be
  40.      *              found.
  41.      * @exception java.net.MalformedURLException   if the URL is malformed.
  42.      */
  43.     Class loadClass(String name)
  44.     throws MalformedURLException, ClassNotFoundException;
  45.  
  46.     /**
  47.      * Load class from codebase URL specified.
  48.      *
  49.      * @exception java.lang.ClassNotFoundException if the class could not be
  50.      *              found.
  51.      * @exception java.net.MalformedURLException   if the URL is malformed.
  52.      */
  53.     Class loadClass(URL codebase, String name)
  54.     throws MalformedURLException, ClassNotFoundException;
  55.  
  56.     /**
  57.      * Returns the security context of the given class loader
  58.      * (e.g., a URL)
  59.      */
  60.     Object getSecurityContext(ClassLoader loader);
  61.     
  62. }
  63.