org.jboss.varia.deployment
Class BeanShellScript
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.system.ServiceDynamicMBeanSupport
org.jboss.varia.deployment.BeanShellScript
- All Implemented Interfaces:
- DynamicMBean, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean
public class BeanShellScript
- extends ServiceDynamicMBeanSupport
A wrapper service that exposes a BeanShell script as a JBoss service
MBean.
- Version:
- $Revision: 81038 $
- Author:
- Sacha Labourey.
- See Also:
BeanShellSubDeployer
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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
deploymentInfo
protected DeploymentInfo deploymentInfo
name
protected String name
scriptService
protected ScriptService scriptService
preferedObjectName
protected ObjectName preferedObjectName
dependsServices
protected ObjectName[] dependsServices
supportedInterfaces
protected HashMap supportedInterfaces
mbeanInfo
protected MBeanInfo mbeanInfo
BeanShellScript
@Deprecated
public BeanShellScript(DeploymentInfo di)
throws DeploymentException
- Deprecated.
- Throws:
DeploymentException
BeanShellScript
public BeanShellScript(URL url)
throws DeploymentException
- Throws:
DeploymentException
init
protected void init(URL url)
throws DeploymentException
- Throws:
DeploymentException
getInternalAttribute
protected Object getInternalAttribute(String attribute)
throws AttributeNotFoundException,
MBeanException,
ReflectionException
- Overrides:
getInternalAttribute
in class ServiceDynamicMBeanSupport
- Throws:
AttributeNotFoundException
MBeanException
ReflectionException
setInternalAttribute
protected void setInternalAttribute(Attribute attribute)
throws AttributeNotFoundException,
InvalidAttributeValueException,
MBeanException,
ReflectionException
- Overrides:
setInternalAttribute
in class ServiceDynamicMBeanSupport
- Throws:
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
internalInvoke
protected Object internalInvoke(String actionName,
Object[] params,
String[] signature)
throws MBeanException,
ReflectionException
- Overrides:
internalInvoke
in class ServiceDynamicMBeanSupport
- Throws:
MBeanException
ReflectionException
getMBeanInfo
public MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfo
in interface DynamicMBean
- Overrides:
getMBeanInfo
in class ServiceDynamicMBeanSupport
createService
protected void createService()
throws Exception
- Overrides:
createService
in class ServiceMBeanSupport
- Throws:
Exception
startService
protected void startService()
throws Exception
- Overrides:
startService
in class ServiceMBeanSupport
- Throws:
Exception
stopService
protected void stopService()
throws Exception
- Overrides:
stopService
in class ServiceMBeanSupport
- Throws:
Exception
destroyService
protected void destroyService()
throws Exception
- Overrides:
destroyService
in class ServiceMBeanSupport
- Throws:
Exception
retrieveCompatibleInvocation
protected BeanShellScript.InvocationCouple retrieveCompatibleInvocation(String name,
String[] signature)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
retrieveCompatibleInvocation
protected BeanShellScript.InvocationCouple retrieveCompatibleInvocation(String name,
Class[] signature)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
loadScript
protected void loadScript(URL url)
throws Exception
- Throws:
Exception
loadScript
protected void loadScript(InputStream stream)
throws Exception
- Load script.
Stream should/must be closed/handled
by the client invoking this method.
- Parameters:
stream
- the stream
- Throws:
Exception
- for any error
generateMBeanInfo
protected MBeanInfo generateMBeanInfo(Class[] intfs)
throws IntrospectionException
- Throws:
IntrospectionException
getPreferedObjectName
public ObjectName getPreferedObjectName()
getDependsServices
public ObjectName[] getDependsServices()
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.