Package java.lang.management

Examples of java.lang.management.ManagementPermission


     * @see java.lang.management.ThreadMXBean#getThreadInfo(long[], int)
     */
    public ThreadInfo[] getThreadInfo(long[] ids, int maxDepth) {
        SecurityManager security = System.getSecurityManager();
        if (security != null) {
            security.checkPermission(new ManagementPermission("monitor"));
        }

        // Validate inputs
        for (int i = 0; i < ids.length; i++) {
            if (ids[i] <= 0) {
View Full Code Here


     * @see java.lang.management.ThreadMXBean#getThreadInfo(long, int)
     */
    public ThreadInfo getThreadInfo(long id, int maxDepth) {
        SecurityManager security = System.getSecurityManager();
        if (security != null) {
            security.checkPermission(new ManagementPermission("monitor"));
        }

        // Validate inputs
        if (id <= 0) {
            throw new IllegalArgumentException(
View Full Code Here

     * @see java.lang.management.ThreadMXBean#resetPeakThreadCount()
     */
    public void resetPeakThreadCount() {
        SecurityManager security = System.getSecurityManager();
        if (security != null) {
            security.checkPermission(new ManagementPermission("control"));
        }
        this.resetPeakThreadCountImpl();
    }
View Full Code Here

                    "Thread contention monitoring is not supported on this virtual machine.");
        }

        SecurityManager security = System.getSecurityManager();
        if (security != null) {
            security.checkPermission(new ManagementPermission("control"));
        }
        this.setThreadContentionMonitoringEnabledImpl(enable);
    }
View Full Code Here

                    "Thread CPU timing is not supported on this virtual machine.");
        }

        SecurityManager security = System.getSecurityManager();
        if (security != null) {
            security.checkPermission(new ManagementPermission("control"));
        }
        this.setThreadCpuTimeEnabledImpl(enable);
    }
View Full Code Here

     * @see java.lang.management.MemoryPoolMXBean#resetPeakUsage()
     */
    public void resetPeakUsage() {
        SecurityManager security = System.getSecurityManager();
        if (security != null) {
            security.checkPermission(new ManagementPermission("control"));
        }
        this.resetPeakUsageImpl();
    }
View Full Code Here

            throw new UnsupportedOperationException(Messages.getString("lm.13")); //$NON-NLS-1$
        }

        SecurityManager security = System.getSecurityManager();
        if (security != null) {
            security.checkPermission(new ManagementPermission("control"));
        }

        if (threshold < 0) {           
            //lm.15=Collection usage threshold cannot be negative.
            throw new IllegalArgumentException(Messages.getString("lm.15")); //$NON-NLS-1$           
View Full Code Here

            throw new UnsupportedOperationException(Messages.getString("lm.13"));
        }

        SecurityManager security = System.getSecurityManager();
        if (security != null) {
            security.checkPermission(new ManagementPermission("control"));
        }

        if (threshold < 0) {
            //lm.15=Collection usage threshold cannot be negative.
            throw new IllegalArgumentException(Messages.getString("lm.15")); //$NON-NLS-1$           
View Full Code Here

            throw new UnsupportedOperationException(Messages.getString("lm.1A")); //$NON-NLS-1$
    }

    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPermission(new ManagementPermission("monitor"));
    }

    return AccessController.doPrivileged(new PrivilegedAction<String>() {
      public String run() {
        return System.getProperty("sun.boot.class.path");
View Full Code Here

   * @see java.lang.management.RuntimeMXBean#getInputArguments()
   */
  public List<String> getInputArguments() {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPermission(new ManagementPermission("monitor"));
    }
       
        // TODO : Retrieve the input args from the VM
        return new ArrayList<String>();
  }
View Full Code Here

TOP

Related Classes of java.lang.management.ManagementPermission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.