org.ow2.jonas.lib.management.extensions.server
Class ServerManagement

java.lang.Object
  extended by org.ow2.jonas.lib.management.extensions.base.BaseManagement
      extended by org.ow2.jonas.lib.management.extensions.server.ServerManagement
All Implemented Interfaces:
IBaseManagement, IServerManagement

public class ServerManagement
extends BaseManagement
implements IServerManagement

Implements server management functions.

Author:
Adriana Danes, Oualaa Hani

Field Summary
protected static org.objectweb.util.monolog.api.Logger logger
           
 
Fields inherited from class org.ow2.jonas.lib.management.extensions.base.BaseManagement
s_Synchro
 
Constructor Summary
ServerManagement()
          Constructor.
 
Method Summary
 void deploy(String fileName, String serverName)
          Deploy a module on a target server in the domain.
 boolean developmentMode(String serviceName, String serverName)
          Return true if a given service is in 'development' mode for a given server managed in the domain.
 List<List<String>> getServerThreadsInformation(String serverName)
          Return a managed server's threads information.
 List<List<String>> getServerThreadsInformation(String jmxUrl, String username, String password)
          Return a managed server's threads information.
 boolean remove(String fileName, String serverName)
          Remove a module on a target server.
 void undeploy(String fileName, String serverName)
          Uneploy a module on a target server.
 
Methods inherited from class org.ow2.jonas.lib.management.extensions.base.BaseManagement
addRealmItem, getAttribute, getAttributes, getDomainName, getInstance, getIntegerAttribute, getKeyValue, getKeyValues, getListMbean, getRealmItems, getRealmItems, getServerConnection, getServerConnection, getServerName, getStringAttribute, getTomcatRealm, getTomcatRealmItems, invoke, isRegistered, setAttribute, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.objectweb.util.monolog.api.Logger logger
Constructor Detail

ServerManagement

public ServerManagement()
Constructor.

Method Detail

getServerThreadsInformation

public List<List<String>> getServerThreadsInformation(String serverName)
                                               throws Exception
Return a managed server's threads information.

Specified by:
getServerThreadsInformation in interface IServerManagement
Parameters:
serverName - The managed server name
Returns:
Thread stack info.
Throws:
Exception - when operation invocation fails

getServerThreadsInformation

public List<List<String>> getServerThreadsInformation(String jmxUrl,
                                                      String username,
                                                      String password)
                                               throws Exception
Return a managed server's threads information.

Specified by:
getServerThreadsInformation in interface IServerManagement
Parameters:
serverName - The managed server name
Throws:
Exception - when operation invocation fails

deploy

public void deploy(String fileName,
                   String serverName)
            throws Exception
Deploy a module on a target server in the domain.

Specified by:
deploy in interface IServerManagement
Parameters:
fileName - Name of the module's file.
serverName - Target server name.
Throws:
Exception - deploy operation failed.

undeploy

public void undeploy(String fileName,
                     String serverName)
              throws Exception
Uneploy a module on a target server.

Specified by:
undeploy in interface IServerManagement
Parameters:
fileName - Name of the module's file.
serverName - Target server name.
Throws:
Exception - undeploy operation failed.

remove

public boolean remove(String fileName,
                      String serverName)
               throws Exception
Remove a module on a target server.

Specified by:
remove in interface IServerManagement
Parameters:
fileName - Name of the module's file.
serverName - Target server name.
Returns:
true if the file successfully deleted
Throws:
Exception - remove operation failed.

developmentMode

public boolean developmentMode(String serviceName,
                               String serverName)
                        throws Exception
Return true if a given service is in 'development' mode for a given server managed in the domain.

Specified by:
developmentMode in interface IServerManagement
Parameters:
serviceName - The service name, for example "depmonitor".
serverName - Target server name.
Returns:
true if a given service is in 'development' mode, false otherwise
Throws:
Exception


Copyright © 2010 OW2 Consortium. All Rights Reserved.