
org.objectweb.jonas.cluster.daemon.ClusterDaemonMBean Maven / Gradle / Ivy
The newest version!
/**
* JOnAS: Java(TM) Open Application Server
* Copyright (C) 2006 Bull S.A.S.
* Contact: [email protected]
*
* 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 1any 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: ClusterDaemonMBean.java 10907 2007-07-10 18:51:35Z eyindanga $
* --------------------------------------------------------------------------
*/
package org.objectweb.jonas.cluster.daemon;
import java.util.ArrayList;
import java.util.Hashtable;
/**
* Defines the MBean interface. Don't use Models MBeans as it will imply some
* external libraries like commons-modeler (easier).
* @author Benoit Pelletier
*/
/**
* @author eyindanga
*
*/
public interface ClusterDaemonMBean {
/**
* @return Object Name
*/
String getobjectName();
/**
* Sets the object name of this mbean
* @param name the Object Name
*/
void setobjectName(String name);
/**
* @return true if it is an event provider
*/
boolean iseventProvider();
/**
* @return true if this managed object implements J2EE State Management Model
*/
boolean isstateManageable();
/**
* @return true if this managed object implements the J2EE StatisticProvider Model
*/
boolean isstatisticsProvider();
/**
* @return
*/
public ArrayList serversNames();
/**
* @return cluster daemon controlled server names.
*/
public ArrayList getControlledServersNames();
/**
* @return the JAVA_HOME for a specified server name
* @param name JOnAS instance name
*/
String getJavaHome4Server(String name);
/**
* @return the JONAS_ROOT for a specified server name
* @param name JOnAS instance name
*/
String getJonasRoot4Server(String name);
/**
* @return the JONAS_BASE for a specified server name
* @param name JOnAS instance name
*/
String getJonasBase4Server(String name);
/**
* Reload the configuration
* @throws ClusterDaemonException if an error occurs
*/
void reloadConfiguration() throws ClusterDaemonException;
/**
* Add a server configuration
* @param name server name
* @param description server description
* @param javaHome JAVA_HOME dir
* @param jonasBase JONAS_BASE dir
* @param jonasRoot JONAS_ROOT dir
* @throws ClusterDaemonException if an error occurs
*/
void addServer(String name, String description, String javaHome, String jonasRoot, String jonasBase) throws ClusterDaemonException;
/**
* Remove a server configuration
* @param name server name
* @throws ClusterDaemonException if an error occurs
*/
void removeServer(String name) throws ClusterDaemonException;
/**
* Modify a server configuration
* @param name server name
* @param description server description
* @param javaHome JAVA_HOME dir
* @param jonasBase JONAS_BASE dir
* @param jonasRoot JONAS_ROOT dir
* @throws ClusterDaemonException if an error occurs
*/
void modifyServer(String name, String description, String javaHome, String jonasRoot, String jonasBase) throws ClusterDaemonException;
/**
* Start a JOnAS instance
* @param name instance name
* @param domainName domain name
* @param prm extra parameters
* @throws ClusterDaemonException if an error occurs
*/
void startJOnAS(String name, String domainName, String prm) throws ClusterDaemonException;
/**
* Stop a JOnAS instance
* @param name instance name
* @throws ClusterDaemonException if an error occurs
*/
void stopJOnAS(String name) throws ClusterDaemonException;
/**
* Ping a JOnAS instance (MBean interface)
* @param name instance name
* @return exit code of the ping (0 ok, 1 ko)
* @throws ClusterDaemonException if an error occurs
*/
int pingJOnAS(String name) throws ClusterDaemonException;
/**
* Start all the JOnAS instances configured with auto-reboot
* @param domainName domain name
* @param prm extra parameters
* @return the nodes list with an indicator started/starting failed
*/
String startAllJOnAS(String domainName, String prm);
/**
* Stop all the JOnAS instances
* @return the nodes list with an indicator stopped/stopping failed
*/
String stopAllJOnAS();
/**
* Stop the cluster daemon instance
*/
void stopClusterDaemon();
/**
* @return clusterd jmx url
*/
String getJmxUrl();
/**
*
* @return Operating system processors number
*/
public String getOperatingSystemAvailableProcessors();
/**
*
* @return OS name
*/
public String getOperatingSystemName();
/**
*
* @return OS version
*/
public String getOperatingSystemVersion();
/**
*
* @return Spec vendor
*/
public String getRunTimeSpecVendor();
/**
*
* @return Spec version
*/
public String getRunTimeSpecVersion();
/**
*
* @return the Vm name
*/
public String getRunTimeVmName();
/**
*
* @return Vm vendor
*/
public String getRunTimeVmVendor();
/**
*
* @return Vm version
*/
public String getRunTimeVmVersion();
/**
* @return hashtable with dynamic attributes keys and values.
*/
public Hashtable getDynamicHostAttributes();
/**
* @return String values of dynamic host infos.
*/
public Hashtable dynamicHostAttributes();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy