org.ow2.jasmine.jadort.service.action
Class WebLogicServerAction
java.lang.Object
org.ow2.jasmine.jadort.service.action.AbstractAction
org.ow2.jasmine.jadort.service.action.AbstractJMXAction
org.ow2.jasmine.jadort.service.action.ServerAction
org.ow2.jasmine.jadort.service.action.WebLogicServerAction
public class WebLogicServerAction
- extends ServerAction
Action for the WebLogic server.
- Author:
- Malek Chahine, Remy Bresson, S. Ali Tokmen
|
Constructor Summary |
protected |
WebLogicServerAction(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebLogicServerAction
protected WebLogicServerAction(org.ow2.jasmine.jadort.api.entities.topology.ServerBean server)
connectViaJMX
protected void connectViaJMX()
throws java.lang.Exception
- Description copied from class:
AbstractJMXAction
- Connects via JMX. This is expected to call
AbstractJMXAction.establishJMXConnection(JMXServiceURL, Map) at
some point.
- Specified by:
connectViaJMX in class AbstractJMXAction
- Throws:
java.lang.Exception - If any exception occurs.
canDeployApplications
public boolean canDeployApplications()
throws java.lang.Exception
- Specified by:
canDeployApplications in class ServerAction
- Returns:
- true if this ServerAction can deploy applications, false
otherwise.
- Throws:
java.lang.Exception
deploy
public void deploy(java.lang.String appName)
throws java.lang.Exception
- Specified by:
deploy in class ServerAction
- Parameters:
appName - Name of the application to deploy, as returned by
ServerAction.upload(ApplicationBean) or
ServerAction.setDefault(String).
- Throws:
java.lang.Exception
enableOrDisableApplications
public boolean enableOrDisableApplications(boolean enable)
throws java.lang.Exception
- Description copied from class:
ServerAction
- Enable or disable or enable all applications in this server.
- Specified by:
enableOrDisableApplications in class ServerAction
- Parameters:
enable - true to enable all applications, false to disable all
applications.
- Returns:
- true if disabling all applications has succeeded, false
otherwise. An exception should only be thrown if a real error
occurs.
- Throws:
java.lang.Exception
erase
public void erase(java.lang.String appName)
throws java.lang.Exception
- Specified by:
erase in class ServerAction
- Parameters:
appName - Name of the application to erase, as returned by
ServerAction.upload(ApplicationBean) or
ServerAction.setDefault(String).
- Throws:
java.lang.Exception
getActiveSessions
public int getActiveSessions(java.lang.String appName)
throws java.lang.Exception
- Specified by:
getActiveSessions in class ServerAction
- Parameters:
appName - Name of the application for which to get the number of
active sessions, as returned by
ServerAction.upload(ApplicationBean) or
ServerAction.setDefault(String).
- Returns:
- Number of active sessions on application named appName.
- Throws:
java.lang.Exception
getActiveSessions
public int getActiveSessions()
throws java.lang.Exception
- Specified by:
getActiveSessions in class ServerAction
- Returns:
- Number of active sessions on all applications of this server.
- Throws:
java.lang.Exception
listOfApplications
public java.util.List<org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean> listOfApplications()
throws java.lang.Exception
- Specified by:
listOfApplications in class ServerAction
- Returns:
- List of applications currently present on this server,
reformatted as ApplicationBean objects.
- Throws:
java.lang.Exception
isStarted
public boolean isStarted()
- Specified by:
isStarted in class ServerAction
- Returns:
- true if server started, false otherwise.
setDefault
public java.lang.String setDefault(java.lang.String appName)
throws java.lang.Exception
- Specified by:
setDefault in class ServerAction
- Parameters:
appName - Name of the application to set as default version
(previous Default version will become Disabled), as returned by
ServerAction.upload(ApplicationBean) or
ServerAction.setDefault(String).
- Returns:
- Old application that was default.
- Throws:
java.lang.Exception
start
public void start()
throws java.lang.Exception
- Description copied from class:
ServerAction
- Start server
- Specified by:
start in class ServerAction
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Description copied from class:
ServerAction
- Stop server
- Specified by:
stop in class ServerAction
- Throws:
java.lang.Exception
undeploy
public void undeploy(java.lang.String appName)
throws java.lang.Exception
- Specified by:
undeploy in class ServerAction
- Parameters:
appName - Name of the application to undeploy, as returned by
ServerAction.upload(ApplicationBean) or
ServerAction.setDefault(String).
- Throws:
java.lang.Exception
upload
public java.lang.String upload(org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean application)
throws java.lang.Exception
- Specified by:
upload in class ServerAction
- Parameters:
application - ApplicationBean to upload.
- Returns:
- Name of the application as saved by the server, to use in the
ServerAction.deploy(String) and
ServerAction.setDefault(String),
ServerAction.undeploy(String) and
ServerAction.erase(String) methods.
- Throws:
java.lang.Exception
getApplicationBean
public org.ow2.jasmine.jadort.api.entities.deployment.ApplicationBean getApplicationBean(java.lang.String appName)
throws java.lang.Exception
- Specified by:
getApplicationBean in class ServerAction
- Parameters:
appName - Name of the application, as returned by
ServerAction.upload(ApplicationBean) or
ServerAction.setDefault(String), for which to obtain an
ApplicationBean.
- Returns:
ApplicationBean corresponding to appName, null if nothing
matches.
- Throws:
java.lang.Exception
Copyright © 2009 OW2 Consortium. All Rights Reserved.