src/share/classes/com/sun/tools/attach/spi/AttachProvider.java

Print this page




  57  * {@link #type <i>type</i>}. The <i>name</i> is typically, but not required to
  58  * be, a name that corresponds to the VM vendor. The Sun JDK implementation,
  59  * for example, ships with attach providers that use the name <i>"sun"</i>. The
  60  * <i>type</i> typically corresponds to the attach mechanism. For example, an
  61  * implementation that uses the Doors inter-process communication mechanism
  62  * might use the type <i>"doors"</i>. The purpose of the name and type is to
  63  * identify providers in environments where there are multiple providers
  64  * installed. </p>
  65  *
  66  * <p> AttachProvider implementations are loaded and instantiated at the first
  67  * invocation of the {@link #providers() providers} method. This method
  68  * attempts to load all provider implementations that are installed on the
  69  * platform. </p>
  70  *
  71  * <p> All of the methods in this class are safe for use by multiple
  72  * concurrent threads. </p>
  73  *
  74  * @since 1.6
  75  */
  76 

  77 public abstract class AttachProvider {
  78 
  79     private static final Object lock = new Object();
  80     private static List<AttachProvider> providers = null;
  81 
  82     /**
  83      * Initializes a new instance of this class.  </p>
  84      *
  85      * @throws  SecurityException
  86      *          If a security manager has been installed and it denies
  87      *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
  88      *          <tt>("createAttachProvider")</tt>
  89      */
  90     protected AttachProvider() {
  91         SecurityManager sm = System.getSecurityManager();
  92         if (sm != null)
  93             sm.checkPermission(new AttachPermission("createAttachProvider"));
  94     }
  95 
  96     /**




  57  * {@link #type <i>type</i>}. The <i>name</i> is typically, but not required to
  58  * be, a name that corresponds to the VM vendor. The Sun JDK implementation,
  59  * for example, ships with attach providers that use the name <i>"sun"</i>. The
  60  * <i>type</i> typically corresponds to the attach mechanism. For example, an
  61  * implementation that uses the Doors inter-process communication mechanism
  62  * might use the type <i>"doors"</i>. The purpose of the name and type is to
  63  * identify providers in environments where there are multiple providers
  64  * installed. </p>
  65  *
  66  * <p> AttachProvider implementations are loaded and instantiated at the first
  67  * invocation of the {@link #providers() providers} method. This method
  68  * attempts to load all provider implementations that are installed on the
  69  * platform. </p>
  70  *
  71  * <p> All of the methods in this class are safe for use by multiple
  72  * concurrent threads. </p>
  73  *
  74  * @since 1.6
  75  */
  76 
  77 @jdk.Supported
  78 public abstract class AttachProvider {
  79 
  80     private static final Object lock = new Object();
  81     private static List<AttachProvider> providers = null;
  82 
  83     /**
  84      * Initializes a new instance of this class.  </p>
  85      *
  86      * @throws  SecurityException
  87      *          If a security manager has been installed and it denies
  88      *          {@link com.sun.tools.attach.AttachPermission AttachPermission}
  89      *          <tt>("createAttachProvider")</tt>
  90      */
  91     protected AttachProvider() {
  92         SecurityManager sm = System.getSecurityManager();
  93         if (sm != null)
  94             sm.checkPermission(new AttachPermission("createAttachProvider"));
  95     }
  96 
  97     /**