当前页面:
在线文档首页 >
JBoss 4.0.1 sp1 varia API Documentation 英文版文档
BeanShellSubDeployer (Various API) - JBoss 4.0.1 sp1 varia API Documentation 英文版文档
org.jboss.varia.deployment
Class BeanShellSubDeployer
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.deployment.SubDeployerSupport
org.jboss.varia.deployment.BeanShellSubDeployer
- All Implemented Interfaces:
- BeanShellSubDeployerMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean, org.jboss.deployment.SubDeployer, org.jboss.deployment.SubDeployerMBean
- public class BeanShellSubDeployer
- extends org.jboss.deployment.SubDeployerSupport
- implements BeanShellSubDeployerMBean
A deployer that takes a bean shell script file and creates a JBoss
mbean service wrapper for the script.
- Version:
- $Revision: 1.5.6.1 $
- Author:
- Sacha Labourey., Scott.Stark@jboss.org, Dimitris Andreadis.
Nested classes inherited from class org.jboss.deployment.SubDeployerSupport |
org.jboss.deployment.SubDeployerSupport.ClassConfiguration |
Fields inherited from class org.jboss.deployment.SubDeployerSupport |
CONFIGURATION, 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.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, RELATIVE_ORDER_100, RELATIVE_ORDER_200, RELATIVE_ORDER_300, RELATIVE_ORDER_400, RELATIVE_ORDER_500, RELATIVE_ORDER_600, RELATIVE_ORDER_700, RELATIVE_ORDER_800, RELATIVE_ORDER_900, START_NOTIFICATION, STOP_NOTIFICATION |
Constructor Summary |
BeanShellSubDeployer()
Default CTOR used to set default values to the Suffixes and RelativeOrder
attributes. |
Method Summary |
boolean |
accepts(org.jboss.deployment.DeploymentInfo sdi)
Returns true if this deployer can deploy the given DeploymentInfo. |
void |
create(org.jboss.deployment.DeploymentInfo di)
Describe create method here. |
URL |
createScriptDeployment(String bshScript,
String scriptName)
Create a bsh deployment given the script content and name. |
void |
destroy(org.jboss.deployment.DeploymentInfo di)
|
void |
init(org.jboss.deployment.DeploymentInfo di)
Describe init method here. |
protected void |
processNestedDeployments(org.jboss.deployment.DeploymentInfo di)
|
void |
start(org.jboss.deployment.DeploymentInfo di)
|
protected void |
startService()
Get a reference to the ServiceController |
void |
stop(org.jboss.deployment.DeploymentInfo di)
|
Methods inherited from class org.jboss.deployment.SubDeployerSupport |
addDeployableFiles, addDeployableJar, createService, deployUrl, destroyService, getRelativeOrder, getSuffixes, isDeployable, setRelativeOrder, setSuffixes, stopService |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, destroy, 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, 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.SubDeployerMBean |
getRelativeOrder, getSuffixes, setRelativeOrder, setSuffixes |
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 |
BEANSHELL_EXTENSION
public static final String BEANSHELL_EXTENSION
- See Also:
- Constant Field Values
BASE_SCRIPT_OBJECT_NAME
public static final String BASE_SCRIPT_OBJECT_NAME
- See Also:
- Constant Field Values
serviceController
protected org.jboss.system.ServiceControllerMBean serviceController
BeanShellSubDeployer
public BeanShellSubDeployer()
- Default CTOR 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.
startService
protected void startService()
throws Exception
- Get a reference to the ServiceController
- Throws:
Exception
processNestedDeployments
protected void processNestedDeployments(org.jboss.deployment.DeploymentInfo di)
throws org.jboss.deployment.DeploymentException
- Throws:
org.jboss.deployment.DeploymentException
accepts
public boolean accepts(org.jboss.deployment.DeploymentInfo sdi)
- Returns true if this deployer can deploy the given DeploymentInfo.
- Specified by:
accepts
in interface BeanShellSubDeployerMBean
- Returns:
- True if this deployer can deploy the given DeploymentInfo.
init
public void init(org.jboss.deployment.DeploymentInfo di)
throws org.jboss.deployment.DeploymentException
- Describe
init
method here.
- Specified by:
init
in interface BeanShellSubDeployerMBean
- Parameters:
di
- a DeploymentInfo
value
- Throws:
org.jboss.deployment.DeploymentException
- if an error occurs
create
public void create(org.jboss.deployment.DeploymentInfo di)
throws org.jboss.deployment.DeploymentException
- Describe
create
method here.
- Specified by:
create
in interface BeanShellSubDeployerMBean
- Parameters:
di
- a DeploymentInfo
value
- Throws:
org.jboss.deployment.DeploymentException
- if an error occurs
start
public void start(org.jboss.deployment.DeploymentInfo di)
throws org.jboss.deployment.DeploymentException
- Specified by:
start
in interface org.jboss.deployment.SubDeployerMBean
- Throws:
org.jboss.deployment.DeploymentException
stop
public void stop(org.jboss.deployment.DeploymentInfo di)
throws org.jboss.deployment.DeploymentException
- Specified by:
stop
in interface org.jboss.deployment.SubDeployerMBean
- Throws:
org.jboss.deployment.DeploymentException
destroy
public void destroy(org.jboss.deployment.DeploymentInfo di)
throws org.jboss.deployment.DeploymentException
- Specified by:
destroy
in interface org.jboss.deployment.SubDeployerMBean
- Throws:
org.jboss.deployment.DeploymentException
createScriptDeployment
public URL createScriptDeployment(String bshScript,
String scriptName)
throws org.jboss.deployment.DeploymentException
- 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 contentscriptName
- the bsh script name to use
- Returns:
- the URL of the temporary file used as the deployment script
- Throws:
org.jboss.deployment.DeploymentException
- thrown on failure to create the bsh
script or deploy it.
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.