org.ow2.ishmael.deploy.spi.impl
Class AbsDeploymentSpecific

java.lang.Object
  extended by org.ow2.ishmael.deploy.spi.impl.AbsDeploymentSpecific
All Implemented Interfaces:
IDeploymentSpecific
Direct Known Subclasses:
DeploymentSpecificEasyBeans, DeploymentSpecificJOnAS

public abstract class AbsDeploymentSpecific
extends java.lang.Object
implements IDeploymentSpecific

Abstract class for specific deployment.

Author:
Florent Benoit

Field Summary
 
Fields inherited from interface org.ow2.ishmael.deploy.spi.impl.IDeploymentSpecific
AVAILABLE, RUNNING
 
Constructor Summary
AbsDeploymentSpecific(java.lang.String uri)
          Constructor.
 
Method Summary
 void addAvailable(java.lang.String module)
           
 void addRunning(java.lang.String module)
           
protected  void deploy(java.util.Properties info)
           
 void deployApplication(java.util.Properties p)
          deploy application p
protected  javax.enterprise.deploy.shared.ModuleType findType(java.lang.String path)
           
 java.util.List getDeployedModules(javax.enterprise.deploy.shared.ModuleType type)
          get deployed modules
protected  javax.management.MBeanServerConnection getMBeanServerConnection()
           
 java.util.HashMap<java.lang.Integer,java.util.List<java.lang.String>> getModuleList(java.lang.String module)
           
protected  javax.management.ObjectName getObjectName()
           
protected abstract  java.lang.String getStringObjectName()
           
 boolean isDeployedApplication(java.util.Properties p)
           
 java.util.List<java.lang.String> listModules(javax.enterprise.deploy.shared.ModuleType type, int state)
          List modules type in a given state
 void removeModule(java.lang.String module)
           
 void removeRunning(java.lang.String module)
           
 java.lang.String sendFile(byte[] file, java.lang.String name)
          distribute (send) the file on the server and copy the result file into JOnAS server directory for deployment
protected  void stop(java.lang.String file)
           
 void stopApplication(java.util.Properties p)
          Stop application p
 void undeployApplication(java.util.Properties p)
          Undeploy application p
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsDeploymentSpecific

public AbsDeploymentSpecific(java.lang.String uri)
                      throws IshmaelDeploymentManagerCreationException
Constructor. Initialize connector to the remote system.

Parameters:
uri - URI given by deployment tool
Throws:
IshmaelDeploymentManagerCreationException
Method Detail

getObjectName

protected javax.management.ObjectName getObjectName()

getMBeanServerConnection

protected javax.management.MBeanServerConnection getMBeanServerConnection()

getStringObjectName

protected abstract java.lang.String getStringObjectName()

listModules

public java.util.List<java.lang.String> listModules(javax.enterprise.deploy.shared.ModuleType type,
                                                    int state)
                                             throws DeploymentException
List modules type in a given state

Specified by:
listModules in interface IDeploymentSpecific
Parameters:
state - of the module RUNNING or AVAILABLE
type - J2EE module types Attention on ne sait toujours pas differentier l'etat Running/Stopping. Lorsqu'une application est deployee , elle est automatiquement starter.
Returns:
Throws:
DeploymentException

getDeployedModules

public java.util.List getDeployedModules(javax.enterprise.deploy.shared.ModuleType type)
                                  throws DeploymentException
get deployed modules

Specified by:
getDeployedModules in interface IDeploymentSpecific
Parameters:
J2EE - module types
Returns:
a list of deployed J2EE module of the given state
Throws:
DeploymentException

deployApplication

public void deployApplication(java.util.Properties p)
                       throws DeploymentException
deploy application p

Specified by:
deployApplication in interface IDeploymentSpecific
Parameters:
p -
Throws:
DeploymentException

undeployApplication

public void undeployApplication(java.util.Properties p)
                         throws DeploymentException
Undeploy application p

Specified by:
undeployApplication in interface IDeploymentSpecific
Parameters:
p -
Throws:
DeploymentException

stopApplication

public void stopApplication(java.util.Properties p)
                     throws DeploymentException
Stop application p

Specified by:
stopApplication in interface IDeploymentSpecific
Parameters:
p -
Throws:
DeploymentException

isDeployedApplication

public boolean isDeployedApplication(java.util.Properties p)
                              throws DeploymentException
Parameters:
p -
Returns:
true if p is deploy false otherwise
Throws:
DeploymentException

addAvailable

public void addAvailable(java.lang.String module)

addRunning

public void addRunning(java.lang.String module)

removeRunning

public void removeRunning(java.lang.String module)

removeModule

public void removeModule(java.lang.String module)

getModuleList

public java.util.HashMap<java.lang.Integer,java.util.List<java.lang.String>> getModuleList(java.lang.String module)

sendFile

public java.lang.String sendFile(byte[] file,
                                 java.lang.String name)
                          throws DeploymentException
distribute (send) the file on the server and copy the result file into JOnAS server directory for deployment

Specified by:
sendFile in interface IDeploymentSpecific
Parameters:
file - Byte Array representing the file to upload
name - name of the file
Returns:
path to the distributed file
Throws:
DeploymentException

deploy

protected void deploy(java.util.Properties info)
               throws DeploymentException
Parameters:
info - property name file indicate the path and name ear file to deploy
Throws:
DeploymentException

stop

protected void stop(java.lang.String file)
             throws DeploymentException
Parameters:
p - String name file to undeploy
Throws:
DeploymentException

findType

protected javax.enterprise.deploy.shared.ModuleType findType(java.lang.String path)
                                                      throws DeploymentException
Throws:
DeploymentException


Copyright ? 2007-2009 OW2 Consortium. All Rights Reserved.