org.jboss.services.deployment
Class DeploymentService

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.system.ListenerServiceMBeanSupport
              extended by org.jboss.services.deployment.DeploymentService
All Implemented Interfaces:
EventListener, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, javax.management.NotificationListener, DeploymentServiceMBean, org.jboss.system.ListenerServiceMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class DeploymentService
extends org.jboss.system.ListenerServiceMBeanSupport
implements DeploymentServiceMBean

Version:
$Revision: 57210 $
Author:
Dimitris Andreadis

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.system.ListenerServiceMBeanSupport
org.jboss.system.ListenerServiceMBeanSupport.SubscriptionInfo
 
Field Summary
static String DEFAULT_DEPLOY_DIR
          where modules are moved for hot deployment
static String DEFAULT_TEMPLATE_DIR
          where to look for templates
static String DEFAULT_UNDEPLOY_DIR
          where modules are created/removed
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ListenerServiceMBean
SL_FILTER_ELEMENT, SL_FILTER_FACTORY_ATTRIBUTE, SL_MBEAN_ELEMENT, SL_MBEAN_HANDBACK_ATTRIBUTE, SL_MBEAN_NAME_ATTRIBUTE, SL_NOTIFICATION_ELEMENT, SL_NOTIFICATION_TYPE_ATTRIBUTE, SL_ROOT_ELEMENT
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
DeploymentService()
          CTOR
 
Method Summary
 String createModule(String module, String template, HashMap properties)
           
 String createModule(String module, String template, String[] properties)
          Used primarily for testing through the jmx-console
 void deployModuleAsynch(String module)
           
 String getDeployDir()
           
 URL getDeployedURL(String module)
           
 String getTemplateDir()
           
 List getTemplatePropertyInfo(String template)
           
 String getUndeployDir()
           
 URL getUndeployedURL(String module)
           
 Set listModuleTemplates()
           
 boolean removeModule(String module)
           
 void setDeployDir(String deployDir)
           
 void setTemplateDir(String templateDir)
           
 void setUndeployDir(String undeployDir)
           
 void startService()
           
 void stopService()
           
 void undeployModuleAsynch(String module)
           
 boolean uploadLibrary(URL src, String filename)
          Upload a new library to server lib dir.
 
Methods inherited from class org.jboss.system.ListenerServiceMBeanSupport
handleNotification, handleNotification2, setSubscriptionList, subscribe, subscribe, subscribe, unsubscribe
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ListenerServiceMBean
setSubscriptionList
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

DEFAULT_TEMPLATE_DIR

public static final String DEFAULT_TEMPLATE_DIR
where to look for templates

See Also:
Constant Field Values

DEFAULT_UNDEPLOY_DIR

public static final String DEFAULT_UNDEPLOY_DIR
where modules are created/removed

See Also:
Constant Field Values

DEFAULT_DEPLOY_DIR

public static final String DEFAULT_DEPLOY_DIR
where modules are moved for hot deployment

See Also:
Constant Field Values
Constructor Detail

DeploymentService

public DeploymentService()
CTOR

Method Detail

setTemplateDir

public void setTemplateDir(String templateDir)
Specified by:
setTemplateDir in interface DeploymentServiceMBean
Parameters:
templateDir - The templateDir to set.

getTemplateDir

public String getTemplateDir()
Specified by:
getTemplateDir in interface DeploymentServiceMBean
Returns:
Returns the templateDir.

getUndeployDir

public String getUndeployDir()
Specified by:
getUndeployDir in interface DeploymentServiceMBean

setUndeployDir

public void setUndeployDir(String undeployDir)
Specified by:
setUndeployDir in interface DeploymentServiceMBean

getDeployDir

public String getDeployDir()
Specified by:
getDeployDir in interface DeploymentServiceMBean

setDeployDir

public void setDeployDir(String deployDir)
Specified by:
setDeployDir in interface DeploymentServiceMBean

listModuleTemplates

public Set listModuleTemplates()
Specified by:
listModuleTemplates in interface DeploymentServiceMBean

getTemplatePropertyInfo

public List getTemplatePropertyInfo(String template)
                             throws Exception
Specified by:
getTemplatePropertyInfo in interface DeploymentServiceMBean
Throws:
Exception

createModule

public String createModule(String module,
                           String template,
                           HashMap properties)
                    throws Exception
Specified by:
createModule in interface DeploymentServiceMBean
Throws:
Exception

createModule

public String createModule(String module,
                           String template,
                           String[] properties)
                    throws Exception
Used primarily for testing through the jmx-console

Specified by:
createModule in interface DeploymentServiceMBean
Throws:
Exception

removeModule

public boolean removeModule(String module)
Specified by:
removeModule in interface DeploymentServiceMBean

deployModuleAsynch

public void deployModuleAsynch(String module)
                        throws Exception
Specified by:
deployModuleAsynch in interface DeploymentServiceMBean
Throws:
Exception

getDeployedURL

public URL getDeployedURL(String module)
                   throws Exception
Specified by:
getDeployedURL in interface DeploymentServiceMBean
Throws:
Exception

undeployModuleAsynch

public void undeployModuleAsynch(String module)
                          throws Exception
Specified by:
undeployModuleAsynch in interface DeploymentServiceMBean
Throws:
Exception

getUndeployedURL

public URL getUndeployedURL(String module)
                     throws Exception
Specified by:
getUndeployedURL in interface DeploymentServiceMBean
Throws:
Exception

uploadLibrary

public boolean uploadLibrary(URL src,
                             String filename)
Upload a new library to server lib dir. A different filename may be specified, when writing the library. If the target filename exists, upload is not performed.

Specified by:
uploadLibrary in interface DeploymentServiceMBean
Parameters:
src - the source url to copy
filename - the filename to use when copying (optional)
Returns:
true if upload was succesful, false otherwise

startService

public void startService()
                  throws Exception
Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

stopService

public void stopService()
Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.