|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.lib.management.extensions.base.AdminHelper
public class AdminHelper
Helper class providing basic info about the current server. Used by management tools.
Constructor Summary | |
---|---|
AdminHelper()
|
Method Summary | |
---|---|
void |
addRemovedServer(String clusterdName,
String srvName)
Called when substracting a server to clusterd supervision |
void |
addSrvConfiguredForClusterd(ServerItem srv)
The given server has been configuered to be affected to a clusterd. |
void |
addVar(String key,
String value)
Add a value for the given key |
void |
clearConfigureForClusterList()
clears the configuredServerForClusterDaemonList list |
String |
getAdminJonasServerConfDir()
|
String |
getAdminJonasServerName()
|
String |
getApplicationContextPath()
|
int |
getApplicationServerPort()
|
int |
getClusterdGraphAttribute(String clusterd,
String attKey)
Get a value of given attribute for given cluster daemon |
Hashtable<String,?> |
getClusterdGraphAttributes()
|
String |
getCurrentCatalinaDefaultHostName()
|
String |
getCurrentCatalinaDomainName()
|
String |
getCurrentCatalinaEngineName()
|
String |
getCurrentCatalinaServiceName()
|
ObjectName |
getCurrentClusterDaemon()
|
String |
getCurrentClusterDaemonName()
|
ObjectName |
getCurrentDomain()
Return the current J2EE domain ObjectName. |
String |
getCurrentDomainName()
Return the current J2EE domain name. |
int |
getCurrentJonasDeploymentType()
|
ObjectName |
getCurrentJonasServer()
Return the ObjectName of the MBean associated to the current Jonas server. |
String |
getCurrentJonasServerName()
Return the current Jonas server name. |
String |
getCurrentSrvToConfigure()
|
protected String |
getServletServerName(String domainName)
Return the name of the servlet server. |
ServerItem |
getSrvConfiguredForClusterd(String key)
Gets a server item for the given key. |
String |
getVar(String key)
Remove a variable |
boolean |
isCatalinaServer()
|
boolean |
isConfiguredForClusterd(String srvName)
Checks if the given server is already configured for being affected to a cluster daemon. |
boolean |
isCurrentJonasServer()
|
boolean |
isJettyServer()
|
boolean |
isSrvRemovedFromClusterd(String clusterdName,
String srvName)
Checks if the given server has been removed from clusterd affectation |
void |
removeVar(String key)
Remove a variable |
protected void |
resetCatalina()
Reset the Catalina server properties. |
protected void |
resetDomain()
Reset the domain properties. |
protected void |
resetJetty()
Reset the Jetty server properties. |
protected void |
resetJonas()
Reset the JOnAS server properties. |
void |
rmvFromClusterdRemovedList(String clusterdName,
String srvName)
Called when substracting a server to clusterd supervision |
void |
setClusterdGraphAttribute(String clusterd,
String attKey,
Integer val)
Set given value of given attribute for given cluster daemon |
void |
setClusterdGraphAttributes(Hashtable<String,Hashtable<String,Integer>> clusterdGraphAttribute)
|
void |
setCurrentClusterDaemon(ObjectName currentClusterDaemon)
|
void |
setCurrentClusterDaemonName(String currentClusterDaemonName)
|
void |
setCurrentJonasDeploymentType(int currentJonasDeploymentType)
|
void |
setCurrentSrvToConfigure(String currentSrvToConfigure)
|
void |
setNewCmiMbeanServerConnection(MBeanServerConnection newCmiMbeanServerConnection)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEPLOYMENT
public static final int DEPLOYMENT_EAR
public static final int DEPLOYMENT_JAR
public static final int DEPLOYMENT_WAR
public static final int DEPLOYMENT_RAR
public static final int DEPLOYMENT_DATASOURCE
public static final int DEPLOYMENT_JMS
public static final int DEPLOYMENT_MAIL
public static final int DOMAIN_DEPLOYMENT_EAR
public static final int DOMAIN_DEPLOYMENT_JAR
public static final int DOMAIN_DEPLOYMENT_WAR
public static final int DOMAIN_DEPLOYMENT_RAR
public static final int DOMAIN_DEPLOYMENT
public static final String DEPLOYMENT_STRING_EAR
public static final String DEPLOYMENT_STRING_JAR
public static final String DEPLOYMENT_STRING_WAR
public static final String DEPLOYMENT_STRING_RAR
public static final String DEPLOYMENT_STRING
public static final String DEPLOYMENT_STRING_DATASOURCE
public static final String DEPLOYMENT_STRING_JMS
public static final String DEPLOYMENT_STRING_MAILFACTORY
public static final String DOMAIN_DEPLOYMENT_STRING_EAR
public static final String DOMAIN_DEPLOYMENT_STRING_JAR
public static final String DOMAIN_DEPLOYMENT_STRING_WAR
public static final String DOMAIN_DEPLOYMENT_STRING_RAR
public static final String DOMAIN_DEPLOYMENT_STRING
protected int applicationServerPort
protected String applicationContextPath
protected boolean catalinaServer
protected String currentCatalinaDomainName
protected String currentCatalinaServiceName
protected String currentCatalinaEngineName
protected String currentCatalinaDefaultHostName
protected boolean jettyServer
protected ObjectName currentDomain
protected ObjectName currentJonasServer
protected ObjectName currentClusterDaemon
protected String currentSrvToConfigure
protected String currentDomainName
protected String currentJonasServerName
protected String currentClusterDaemonName
protected String adminJonasServerName
protected String adminJonasServerConfDir
protected boolean theCurrentJonasServer
protected int currentJonasDeploymentType
protected Hashtable<String,Hashtable<String,Integer>> clusterdGraphAttributes
protected Hashtable<String,ServerItem> configuredServerForClusterDaemonList
protected MBeanServerConnection newCmiMbeanServerConnection
protected Hashtable<String,ArrayList<String>> removedServersPerClusterd
protected Hashtable<String,String> variables
Constructor Detail |
---|
public AdminHelper()
Method Detail |
---|
public String getCurrentJonasServerName()
public ObjectName getCurrentJonasServer()
public ObjectName getCurrentDomain()
public String getCurrentDomainName()
protected String getServletServerName(String domainName) throws ManagementException
ManagementException
protected void resetCatalina()
protected void resetJetty()
protected void resetJonas()
protected void resetDomain()
public boolean isCatalinaServer()
public String getCurrentCatalinaServiceName()
public boolean isCurrentJonasServer()
public int getCurrentJonasDeploymentType()
public void setCurrentJonasDeploymentType(int currentJonasDeploymentType)
public int getApplicationServerPort()
public String getApplicationContextPath()
public String getCurrentCatalinaDefaultHostName()
public String getCurrentCatalinaEngineName()
public String getCurrentCatalinaDomainName()
public boolean isJettyServer()
public String getAdminJonasServerName()
public String getAdminJonasServerConfDir()
public ObjectName getCurrentClusterDaemon()
public void setCurrentClusterDaemon(ObjectName currentClusterDaemon)
currentClusterDaemon
- public String getCurrentClusterDaemonName()
public void setCurrentClusterDaemonName(String currentClusterDaemonName)
currentClusterDaemonName
- public Hashtable<String,?> getClusterdGraphAttributes()
public void setClusterdGraphAttributes(Hashtable<String,Hashtable<String,Integer>> clusterdGraphAttribute)
public int getClusterdGraphAttribute(String clusterd, String attKey) throws Exception
clusterd
- the cluster daemon nameattKey
- get value of this attribute
Exception
public void setClusterdGraphAttribute(String clusterd, String attKey, Integer val) throws Exception
clusterd
- the cluster daemon nameattKey
- set value of this attributeVal
- the value to set
Exception
public String getCurrentSrvToConfigure()
public void setCurrentSrvToConfigure(String currentSrvToConfigure)
currentSrvToConfigure
- the currentSrvToConfigure to setpublic void addSrvConfiguredForClusterd(ServerItem srv) throws Exception
srv
-
Exception
- if the ServerItem parameter is nullpublic ServerItem getSrvConfiguredForClusterd(String key) throws Exception
key
-
Exception
- if the ServerItem parameter is nullpublic boolean isConfiguredForClusterd(String srvName) throws Exception
srvName
- the server to find
Exception
public void clearConfigureForClusterList()
public void setNewCmiMbeanServerConnection(MBeanServerConnection newCmiMbeanServerConnection)
newCmiMbeanServerConnection
- the newCmiMbeanServerConnection to setpublic void addRemovedServer(String clusterdName, String srvName)
clusterdName
- the cluster daemon namesrvName
- the server to removepublic boolean isSrvRemovedFromClusterd(String clusterdName, String srvName)
clusterdName
- srvName
-
public void rmvFromClusterdRemovedList(String clusterdName, String srvName)
clusterdName
- the cluster daemon namesrvName
- the server to removepublic void addVar(String key, String value)
key
- the key to addvalue
- to addpublic void removeVar(String key)
key
- the variable keypublic String getVar(String key)
key
- the variable key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |