1. /*
  2. * @(#)LoaderHandler.java 1.18 04/05/18
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.rmi.server;
  8. import java.net.MalformedURLException;
  9. import java.net.URL;
  10. /**
  11. * <code>LoaderHandler</code> is an interface used internally by the RMI
  12. * runtime in previous implementation versions. It should never be accessed
  13. * by application code.
  14. *
  15. * @version 1.18, 05/18/04
  16. * @author Ann Wollrath
  17. * @since JDK1.1
  18. *
  19. * @deprecated no replacement
  20. */
  21. @Deprecated
  22. public interface LoaderHandler {
  23. /** package of system <code>LoaderHandler</code> implementation. */
  24. final static String packagePrefix = "sun.rmi.server";
  25. /**
  26. * Loads a class from the location specified by the
  27. * <code>java.rmi.server.codebase</code> property.
  28. *
  29. * @param name the name of the class to load
  30. * @return the <code>Class</code> object representing the loaded class
  31. * @exception MalformedURLException
  32. * if the system property <b>java.rmi.server.codebase</b>
  33. * contains an invalid URL
  34. * @exception ClassNotFoundException
  35. * if a definition for the class could not
  36. * be found at the codebase location.
  37. * @since JDK1.1
  38. * @deprecated no replacement
  39. */
  40. @Deprecated
  41. Class<?> loadClass(String name)
  42. throws MalformedURLException, ClassNotFoundException;
  43. /**
  44. * Loads a class from a URL.
  45. *
  46. * @param codebase the URL from which to load the class
  47. * @param name the name of the class to load
  48. * @return the <code>Class</code> object representing the loaded class
  49. * @exception MalformedURLException
  50. * if the <code>codebase</code> paramater
  51. * contains an invalid URL
  52. * @exception ClassNotFoundException
  53. * if a definition for the class could not
  54. * be found at the specified URL
  55. * @since JDK1.1
  56. * @deprecated no replacement
  57. */
  58. @Deprecated
  59. Class<?> loadClass(URL codebase, String name)
  60. throws MalformedURLException, ClassNotFoundException;
  61. /**
  62. * Returns the security context of the given class loader.
  63. *
  64. * @param loader a class loader from which to get the security context
  65. * @return the security context
  66. * @since JDK1.1
  67. * @deprecated no replacement
  68. */
  69. @Deprecated
  70. Object getSecurityContext(ClassLoader loader);
  71. }