1. /*
  2. * @(#)PrivateMLet.java 1.12 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.management.loading;
  8. import java.net.URL;
  9. import java.net.URLStreamHandlerFactory;
  10. /**
  11. * An MLet that is not added to the {@link ClassLoaderRepository}.
  12. * This class acts exactly like its parent class, {@link MLet}, with
  13. * one exception. When a PrivateMLet is registered in an MBean
  14. * server, it is not added to that MBean server's {@link
  15. * ClassLoaderRepository}. This is true because this class implements
  16. * the interface {@link PrivateClassLoader}.
  17. *
  18. * @since 1.5
  19. * @since.unbundled JMX 1.2
  20. */
  21. public class PrivateMLet extends MLet implements PrivateClassLoader {
  22. private static final long serialVersionUID = 2503458973393711979L;
  23. /**
  24. * Constructs a new PrivateMLet for the specified URLs using the
  25. * default delegation parent ClassLoader. The URLs will be
  26. * searched in the order specified for classes and resources
  27. * after first searching in the parent class loader.
  28. *
  29. * @param urls The URLs from which to load classes and resources.
  30. * @param delegateToCLR True if, when a class is not found in
  31. * either the parent ClassLoader or the URLs, the MLet should delegate
  32. * to its containing MBeanServer's {@link ClassLoaderRepository}.
  33. *
  34. */
  35. public PrivateMLet(URL[] urls, boolean delegateToCLR) {
  36. super(urls, delegateToCLR);
  37. }
  38. /**
  39. * Constructs a new PrivateMLet for the given URLs. The URLs will
  40. * be searched in the order specified for classes and resources
  41. * after first searching in the specified parent class loader.
  42. * The parent argument will be used as the parent class loader
  43. * for delegation. The factory argument will be used as the
  44. * stream handler factory to obtain protocol handlers when
  45. * creating new URLs.
  46. *
  47. * @param urls The URLs from which to load classes and resources.
  48. * @param parent The parent class loader for delegation.
  49. * @param delegateToCLR True if, when a class is not found in
  50. * either the parent ClassLoader or the URLs, the MLet should delegate
  51. * to its containing MBeanServer's {@link ClassLoaderRepository}.
  52. *
  53. */
  54. public PrivateMLet(URL[] urls, ClassLoader parent, boolean delegateToCLR) {
  55. super(urls, parent, delegateToCLR);
  56. }
  57. /**
  58. * Constructs a new PrivateMLet for the specified URLs, parent
  59. * class loader, and URLStreamHandlerFactory. The parent argument
  60. * will be used as the parent class loader for delegation. The
  61. * factory argument will be used as the stream handler factory to
  62. * obtain protocol handlers when creating new URLs.
  63. *
  64. * @param urls The URLs from which to load classes and resources.
  65. * @param parent The parent class loader for delegation.
  66. * @param factory The URLStreamHandlerFactory to use when creating URLs.
  67. * @param delegateToCLR True if, when a class is not found in
  68. * either the parent ClassLoader or the URLs, the MLet should delegate
  69. * to its containing MBeanServer's {@link ClassLoaderRepository}.
  70. *
  71. */
  72. public PrivateMLet(URL[] urls,
  73. ClassLoader parent,
  74. URLStreamHandlerFactory factory,
  75. boolean delegateToCLR) {
  76. super(urls, parent, factory, delegateToCLR);
  77. }
  78. }