/**
 * JOnAS: Java(TM) Open Application Server
 * Copyright (C) 2006 Bull S.A.
 * Contact: jonas-team@objectweb.org
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 *
 * --------------------------------------------------------------------------
 * $Id$
 * --------------------------------------------------------------------------
 */
package org.objectweb.jonas.management.monitoring;

import javax.management.MBeanServer;


/**
 * Implements MBean interface for proxy MBeans. A proxy MBean represents a server in
 * the domain on the master server's MBean server.
 * @author Adriana Danes
 */
public interface ServerProxyMBean {

    /**
     * @return maximum number of retries when detecting a broken connection
     */
    int getMaxcheck();

    /**
     * @param maxcheck value for maximum number of retries when detecting a broken connection
     */
    void setMaxcheck(int maxcheck);

    /**
     * Set state to RUNNING
     */
    void startit();
    /**
     * Stop server
     */
    void stopit();

    public void deployModule(String filename);
    public void undeployModule(String filename);
    public void uploadFile(String filename, boolean replaceExisting);
    public void uploadDeployModule(String filename, boolean replaceExisting);

    public String getClusterDaemonName();

    public int getAllThreadsCount();

    public int getConnectionFailuresJCAConnection();

    public int getConnectionLeaksJCAConnection();

    public int getCurrentBusyJCAConnection();

    public int getCurrentNumberOfEntityBean();

    public int getCurrentNumberOfEJB();

    public int getCurrentNumberOfMDB();

    public int getCurrentNumberOfSBF();

    public int getCurrentNumberOfSBL();

    public int getCurrentOpenedJCAConnection();

    boolean getTomcat();

    public int getCurrentThreadBusyByConnectorTomcat();

    public int getCurrentThreadCountByConnectorTomcat();

    public int getRequestCountByConnectorTomcat();

    public int getErrorCountByConnectorTomcat();

    public int getMaxThreadsByConnectorTomcat();

    public long getProcessingTimeByConnectorTomcat();

    public long getBytesReceivedByConnectorTomcat();

    public long getBytesSentByConnectorTomcat();

    public Long getCurrentTotalMemory();

    public Long getCurrentUsedMemory();

    public String getHostName();

    public String getJavaVendor();

    public String getJavaVersion();

    public boolean getJmsJoram();

    public int getJmsQueuesNbMsgsDeliverSinceCreation();

    public int getJmsQueuesNbMsgsReceiveSinceCreation();

    public int getJmsQueuesNbMsgsSendToDMQSinceCreation();

    public int getJmsTopicsNbMsgsDeliverSinceCreation();

    public int getJmsTopicsNbMsgsReceiveSinceCreation();

    public int getJmsTopicsNbMsgsSendToDMQSinceCreation();

    public String getJOnASVersion();

    public String getLoadCPU();

    public MBeanServer getMbeanServer();

    boolean getWorkers();

    public int getMinWorkerPoolSize();

    public int getMaxWorkerPoolSize();

    public int getCurrentWorkerPoolSize();

    public String getProtocols();

    public int getRejectedOpenJCAConnection();

    boolean getJcaConnection();

    boolean getJdbcDatasource();
    /**
     * @return the server's state as known by the proxy
     */
    String getState();

    boolean getTransaction();

    public int getTotalBegunTransactions();

    public int getTotalCommittedTransactions();

    public int getTotalCurrentTransactions();

    public int getTotalExpiredTransactions();

    public int getTotalRolledbackTransactions();

    public int getWaiterCountJCAConnection();

    public long getWaitingTimeJCAConnection();

    public int getServedOpenJCAConnection();

    int getConnectionFailuresJDBCResource();
    int getConnectionLeaksJDBCResource();
    int getCurrentBusyJDBCResource();
    int getCurrentOpenedJDBCResource();
    int getRejectedOpenJDBCResource();
    int getServedOpenJDBCResource();
    int getWaiterCountJDBCResource();
    long getWaitingTimeJDBCResource();

    public String getObjectName();

    public String getConnectionUrl();
}