001/*
002 * JPPF.
003 * Copyright (C) 2005-2015 JPPF Team.
004 * http://www.jppf.org
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.jppf.management.generated;
020
021import org.jppf.management.AbstractMBeanStaticProxy;
022import org.jppf.management.JMXConnectionWrapper;
023import org.jppf.management.diagnostics.DiagnosticsMBean;
024import org.jppf.management.diagnostics.HealthSnapshot;
025import org.jppf.management.diagnostics.MemoryInformation;
026import org.jppf.management.diagnostics.ThreadDump;
027
028/**
029 * Generated static proxy for the {@link org.jppf.management.diagnostics.DiagnosticsMBean} MBean interface.
030 * @author /common/src/java/org/jppf/utils/generator/MBeanStaticProxyGenerator.java
031 */
032public class NodeDiagnosticsMBeanStaticProxy extends AbstractMBeanStaticProxy implements DiagnosticsMBean {
033  /**
034   * Initialize this MBean static proxy.
035   * @param connection the JMX connection used to invoke remote MBean methods.
036   */
037  public NodeDiagnosticsMBeanStaticProxy(final JMXConnectionWrapper connection) {
038    super(connection, "org.jppf:name=diagnostics,type=node");
039  }
040
041  /**
042   * Get the JMX object name for this MBean static proxy.
043   * @return the object name as a string.
044   */
045  public static final String getMBeanName() {
046    return "org.jppf:name=diagnostics,type=node";
047  }
048
049  @Override
050  public Boolean hasDeadlock() {
051    return (Boolean) invoke("hasDeadlock", (Object[]) null, (String[]) null);
052  }
053
054  @Override
055  public Double cpuLoad() {
056    return (Double) invoke("cpuLoad", (Object[]) null, (String[]) null);
057  }
058
059  @Override
060  public String heapDump() {
061    return (String) invoke("heapDump", (Object[]) null, (String[]) null);
062  }
063
064  @Override
065  public String[] threadNames() {
066    return (String[]) invoke("threadNames", (Object[]) null, (String[]) null);
067  }
068
069  @Override
070  public HealthSnapshot healthSnapshot() {
071    return (HealthSnapshot) invoke("healthSnapshot", (Object[]) null, (String[]) null);
072  }
073
074  @Override
075  public MemoryInformation memoryInformation() {
076    return (MemoryInformation) invoke("memoryInformation", (Object[]) null, (String[]) null);
077  }
078
079  @Override
080  public ThreadDump threadDump() {
081    return (ThreadDump) invoke("threadDump", (Object[]) null, (String[]) null);
082  }
083
084  @Override
085  public void gc() {
086    invoke("gc", (Object[]) null, (String[]) null);
087  }
088}