org.jboss.varia.deployment
Class BeanShellSubDeployer

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.deployment.SubDeployerSupport
              extended by org.jboss.varia.deployment.BeanShellSubDeployer
All Implemented Interfaces:
MBeanRegistration, NotificationBroadcaster, NotificationEmitter, SubDeployer, SubDeployerExt, SubDeployerExtMBean, SubDeployerMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean, BeanShellSubDeployerMBean

Deprecated.

@Deprecated
public class BeanShellSubDeployer
extends SubDeployerSupport
implements BeanShellSubDeployerMBean

A deployer that takes a bean shell script file and creates a JBoss MBean service wrapper for the script.

Version:
$Revision: 81038 $
Author:
Sacha Labourey., Scott Stark, Dimitris Andreadis.

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.deployment.SubDeployerSupport
SubDeployerSupport.ClassConfiguration
 
Field Summary
static String BASE_SCRIPT_OBJECT_NAME
          Deprecated.  
protected  ServiceControllerMBean serviceController
          Deprecated.  
 
Fields inherited from class org.jboss.deployment.SubDeployerSupport
CONFIGURATION, enhancedSuffixes, mainDeployer, nativePrefix, nativeSuffix, relativeOrder, suffixes, tempDeployDir
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.varia.deployment.BeanShellSubDeployerMBean
OBJECT_NAME
 
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
 
Fields inherited from interface org.jboss.deployment.SubDeployer
CREATE_NOTIFICATION, DESTROY_NOTIFICATION, INIT_NOTIFICATION, START_NOTIFICATION, STOP_NOTIFICATION
 
Constructor Summary
BeanShellSubDeployer()
          Deprecated. Default contructor used to set default values to the Suffixes and RelativeOrder attributes.
 
Method Summary
 boolean accepts(DeploymentInfo sdi)
          Deprecated. Returns true if this deployer can deploy the given DeploymentInfo.
 void create(DeploymentInfo di)
          Deprecated. Describe create method here.
 URL createScriptDeployment(String bshScript, String scriptName)
          Deprecated. Create a bsh deployment given the script content and name.
 void destroy(DeploymentInfo di)
          Deprecated.  
 void init(DeploymentInfo di)
          Deprecated. Describe init method here.
protected  void processNestedDeployments(DeploymentInfo di)
          Deprecated.  
 void start(DeploymentInfo di)
          Deprecated.  
protected  void startService()
          Deprecated. Get a reference to the ServiceController
 void stop(DeploymentInfo di)
          Deprecated.  
 
Methods inherited from class org.jboss.deployment.SubDeployerSupport
addDeployableFiles, addDeployableJar, createService, deployUrl, destroyService, emitNotification, getEnhancedSuffixes, getRelativeOrder, getSuffixes, isDeployable, setEnhancedSuffixes, setRelativeOrder, setSuffixes, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext
 
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.deployment.SubDeployerExtMBean
getEnhancedSuffixes, setEnhancedSuffixes
 
Methods inherited from interface org.jboss.deployment.SubDeployerMBean
getRelativeOrder, getServiceName, getSuffixes
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
Methods inherited from interface org.jboss.deployment.SubDeployer
getServiceName
 

Field Detail

BASE_SCRIPT_OBJECT_NAME

public static final String BASE_SCRIPT_OBJECT_NAME
Deprecated. 
See Also:
Constant Field Values

serviceController

protected ServiceControllerMBean serviceController
Deprecated. 
Constructor Detail

BeanShellSubDeployer

public BeanShellSubDeployer()
Deprecated. 
Default contructor used to set default values to the Suffixes and RelativeOrder attributes. Those are read at subdeployer registration time by the MainDeployer to alter its SuffixOrder.

Method Detail

startService

protected void startService()
                     throws Exception
Deprecated. 
Get a reference to the ServiceController

Overrides:
startService in class SubDeployerSupport
Throws:
Exception

processNestedDeployments

protected void processNestedDeployments(DeploymentInfo di)
                                 throws DeploymentException
Deprecated. 
Overrides:
processNestedDeployments in class SubDeployerSupport
Throws:
DeploymentException

accepts

public boolean accepts(DeploymentInfo sdi)
Deprecated. 
Returns true if this deployer can deploy the given DeploymentInfo.

Specified by:
accepts in interface SubDeployer
Specified by:
accepts in interface SubDeployerMBean
Overrides:
accepts in class SubDeployerSupport
Returns:
True if this deployer can deploy the given DeploymentInfo.

init

public void init(DeploymentInfo di)
          throws DeploymentException
Deprecated. 
Describe init method here.

Specified by:
init in interface SubDeployer
Specified by:
init in interface SubDeployerMBean
Overrides:
init in class SubDeployerSupport
Parameters:
di - a DeploymentInfo value
Throws:
DeploymentException - if an error occurs

create

public void create(DeploymentInfo di)
            throws DeploymentException
Deprecated. 
Describe create method here.

Specified by:
create in interface SubDeployer
Specified by:
create in interface SubDeployerMBean
Overrides:
create in class SubDeployerSupport
Parameters:
di - a DeploymentInfo value
Throws:
DeploymentException - if an error occurs

start

public void start(DeploymentInfo di)
           throws DeploymentException
Deprecated. 
Specified by:
start in interface SubDeployer
Specified by:
start in interface SubDeployerMBean
Overrides:
start in class SubDeployerSupport
Throws:
DeploymentException

stop

public void stop(DeploymentInfo di)
          throws DeploymentException
Deprecated. 
Specified by:
stop in interface SubDeployer
Specified by:
stop in interface SubDeployerMBean
Overrides:
stop in class SubDeployerSupport
Throws:
DeploymentException

destroy

public void destroy(DeploymentInfo di)
             throws DeploymentException
Deprecated. 
Specified by:
destroy in interface SubDeployer
Specified by:
destroy in interface SubDeployerMBean
Overrides:
destroy in class SubDeployerSupport
Throws:
DeploymentException

createScriptDeployment

public URL createScriptDeployment(String bshScript,
                                  String scriptName)
                           throws DeploymentException
Deprecated. 
Create a bsh deployment given the script content and name. This creates a temp file using File.createTempFile(scriptName, ".bsh") and then deploys this script via the main deployer.

Specified by:
createScriptDeployment in interface BeanShellSubDeployerMBean
Parameters:
bshScript - the bsh script content
scriptName - the bsh script name to use
Returns:
the URL of the temporary file used as the deployment script
Throws:
DeploymentException - thrown on failure to create the bsh script or deploy it.


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.