org.jboss.services.deployment
Class DeploymentService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.system.ListenerServiceMBeanSupport (src) 
              extended byorg.jboss.services.deployment.DeploymentService
All Implemented Interfaces:
java.util.EventListener, ListenerServiceMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , NotificationListener (src) , Service (src) , ServiceMBean (src)

public class DeploymentService
extends ListenerServiceMBeanSupport (src)


Nested Class Summary
 
Nested classes inherited from class org.jboss.system.ListenerServiceMBeanSupport (src)
ListenerServiceMBeanSupport.SubscriptionInfo (src)
 
Field Summary
static java.lang.String DEFAULT_DEPLOY_DIR
          where modules are moved for hot deployment
static java.lang.String DEFAULT_TEMPLATE_DIR
          where to look for templates
static java.lang.String DEFAULT_UNDEPLOY_DIR
          where modules are created/removed
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ListenerServiceMBean (src)
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 (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
DeploymentService()
          CTOR
 
Method Summary
 java.lang.String createModule(java.lang.String module, java.lang.String template, java.util.HashMap properties)
           
 java.lang.String createModule(java.lang.String module, java.lang.String template, java.lang.String[] properties)
          Used primarily for testing through the jmx-console
 void deployModuleAsynch(java.lang.String module)
           
 java.lang.String getDeployDir()
           
 java.net.URL getDeployedURL(java.lang.String module)
           
 java.lang.String getTemplateDir()
           
 java.util.List getTemplatePropertyInfo(java.lang.String template)
           
 java.lang.String getUndeployDir()
           
 java.net.URL getUndeployedURL(java.lang.String module)
           
 java.util.Set listModuleTemplates()
           
 boolean removeModule(java.lang.String module)
           
 void setDeployDir(java.lang.String deployDir)
           
 void setTemplateDir(java.lang.String templateDir)
           
 void setUndeployDir(java.lang.String undeployDir)
           
 void startService()
          Sub-classes should override this method to provide custum 'start' logic.
 void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 void undeployModuleAsynch(java.lang.String module)
           
 boolean uploadLibrary(java.net.URL src, java.lang.String filename)
          Upload a new library to server lib dir.
 
Methods inherited from class org.jboss.system.ListenerServiceMBeanSupport (src)
handleNotification, handleNotification2, setSubscriptionList, subscribe, subscribe, subscribe, unsubscribe
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, 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 (src)
addNotificationListener, getNotificationInfo, handleNotification, 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.ServiceMBean (src)
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Field Detail

DEFAULT_TEMPLATE_DIR

public static final java.lang.String DEFAULT_TEMPLATE_DIR
where to look for templates

See Also:
Constant Field Values (src)

DEFAULT_UNDEPLOY_DIR

public static final java.lang.String DEFAULT_UNDEPLOY_DIR
where modules are created/removed

See Also:
Constant Field Values (src)

DEFAULT_DEPLOY_DIR

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

See Also:
Constant Field Values (src)
Constructor Detail

DeploymentService

public DeploymentService()
CTOR

Method Detail

setTemplateDir

public void setTemplateDir(java.lang.String templateDir)
Parameters:
templateDir - The templateDir to set.

getTemplateDir

public java.lang.String getTemplateDir()
Returns:
Returns the templateDir.

getUndeployDir

public java.lang.String getUndeployDir()

setUndeployDir

public void setUndeployDir(java.lang.String undeployDir)

getDeployDir

public java.lang.String getDeployDir()

setDeployDir

public void setDeployDir(java.lang.String deployDir)

listModuleTemplates

public java.util.Set listModuleTemplates()

getTemplatePropertyInfo

public java.util.List getTemplatePropertyInfo(java.lang.String template)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

createModule

public java.lang.String createModule(java.lang.String module,
                                     java.lang.String template,
                                     java.util.HashMap properties)
                              throws java.lang.Exception
Throws:
java.lang.Exception

createModule

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

Throws:
java.lang.Exception

removeModule

public boolean removeModule(java.lang.String module)

deployModuleAsynch

public void deployModuleAsynch(java.lang.String module)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getDeployedURL

public java.net.URL getDeployedURL(java.lang.String module)
                            throws java.lang.Exception
Throws:
java.lang.Exception

undeployModuleAsynch

public void undeployModuleAsynch(java.lang.String module)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getUndeployedURL

public java.net.URL getUndeployedURL(java.lang.String module)
                              throws java.lang.Exception
Throws:
java.lang.Exception

uploadLibrary

public boolean uploadLibrary(java.net.URL src,
                             java.lang.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.

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 java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

public void stopService()
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)