org.jboss.varia.deployment
Class BeanShellScript

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.system.ServiceDynamicMBeanSupport (src) 
              extended byorg.jboss.varia.deployment.BeanShellScript
All Implemented Interfaces:
DynamicMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class BeanShellScript
extends ServiceDynamicMBeanSupport (src)

A wrapper service that exposes a BeanShell script as a JBoss service mbean.

See Also:
BeanShellSubDeployer (src)

Nested Class Summary
 class BeanShellScript.InvocationCouple (src)
           
 
Field Summary
protected static java.util.HashMap basicTypes
           
protected  ObjectName (src) [] dependsServices
           
protected  DeploymentInfo (src) deploymentInfo
           
protected  Interpreter interpreter
           
protected  MBeanInfo (src) mbeanInfo
           
protected  java.lang.String name
           
protected  ObjectName (src) preferedObjectName
           
protected  ScriptService (src) scriptService
           
protected  java.util.HashMap supportedInterfaces
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
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
BeanShellScript(DeploymentInfo (src)  di)
           
 
Method Summary
protected  void createService()
          Sub-classes should override this method to provide custum 'create' logic.
protected  void destroyService()
          Sub-classes should override this method to provide custum 'destroy' logic.
protected  MBeanInfo (src) generateMBeanInfo(java.lang.Class[] intfs)
           
 ObjectName (src) [] getDependsServices()
           
protected  java.lang.Object getInternalAttribute(java.lang.String attribute)
           
 MBeanInfo (src) getMBeanInfo()
          Returns the management interface that describes this dynamic resource.
 ObjectName (src) getPreferedObjectName()
           
protected  java.lang.Object internalInvoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
           
protected  void loadScript(java.net.URL url)
           
protected  BeanShellScript.InvocationCouple (src) retrieveCompatibleInvocation(java.lang.String name, java.lang.Class[] signature)
           
protected  BeanShellScript.InvocationCouple (src) retrieveCompatibleInvocation(java.lang.String name, java.lang.String[] signature)
           
protected  void setInternalAttribute(Attribute (src)  attribute)
           
protected  void startService()
          Sub-classes should override this method to provide custum 'start' logic.
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 
Methods inherited from class org.jboss.system.ServiceDynamicMBeanSupport (src)
getAttribute, getAttributes, getInternalAttributeInfo, getInternalConstructorInfo, getInternalDescription, getInternalNotificationInfo, getInternalOperationInfo, invoke, setAttribute, setAttributes
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
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 (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
 

Field Detail

deploymentInfo

protected DeploymentInfo (src)  deploymentInfo

name

protected java.lang.String name

interpreter

protected Interpreter interpreter

scriptService

protected ScriptService (src)  scriptService

preferedObjectName

protected ObjectName (src)  preferedObjectName

dependsServices

protected ObjectName (src) [] dependsServices

supportedInterfaces

protected java.util.HashMap supportedInterfaces

mbeanInfo

protected MBeanInfo (src)  mbeanInfo

basicTypes

protected static java.util.HashMap basicTypes
Constructor Detail

BeanShellScript

public BeanShellScript(DeploymentInfo (src)  di)
                throws DeploymentException (src) 
Method Detail

getInternalAttribute

protected java.lang.Object getInternalAttribute(java.lang.String attribute)
                                         throws AttributeNotFoundException (src) ,
                                                MBeanException (src) ,
                                                ReflectionException (src) 
Overrides:
getInternalAttribute in class ServiceDynamicMBeanSupport (src)
Throws:
AttributeNotFoundException (src)
MBeanException (src)
ReflectionException (src)

setInternalAttribute

protected void setInternalAttribute(Attribute (src)  attribute)
                             throws AttributeNotFoundException (src) ,
                                    InvalidAttributeValueException (src) ,
                                    MBeanException (src) ,
                                    ReflectionException (src) 
Overrides:
setInternalAttribute in class ServiceDynamicMBeanSupport (src)
Throws:
AttributeNotFoundException (src)
InvalidAttributeValueException (src)
MBeanException (src)
ReflectionException (src)

internalInvoke

protected java.lang.Object internalInvoke(java.lang.String actionName,
                                          java.lang.Object[] params,
                                          java.lang.String[] signature)
                                   throws MBeanException (src) ,
                                          ReflectionException (src) 
Overrides:
internalInvoke in class ServiceDynamicMBeanSupport (src)
Throws:
MBeanException (src)
ReflectionException (src)

getMBeanInfo

public MBeanInfo (src)  getMBeanInfo()
Description copied from interface: DynamicMBean (src)
Returns the management interface that describes this dynamic resource. It is the responsibility of the implementation to make sure the description is accurate.

Specified by:
getMBeanInfo in interface DynamicMBean (src)
Overrides:
getMBeanInfo in class ServiceDynamicMBeanSupport (src)

createService

protected void createService()
                      throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'create' 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:
createService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

startService

protected 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

protected void stopService()
                    throws java.lang.Exception
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)
Throws:
java.lang.Exception

destroyService

protected void destroyService()
                       throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'destroy' 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:
destroyService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

retrieveCompatibleInvocation

protected BeanShellScript.InvocationCouple (src)  retrieveCompatibleInvocation(java.lang.String name,
                                                                        java.lang.String[] signature)
                                                                 throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

retrieveCompatibleInvocation

protected BeanShellScript.InvocationCouple (src)  retrieveCompatibleInvocation(java.lang.String name,
                                                                        java.lang.Class[] signature)
                                                                 throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

loadScript

protected void loadScript(java.net.URL url)
                   throws java.lang.Exception
Throws:
java.lang.Exception

generateMBeanInfo

protected MBeanInfo (src)  generateMBeanInfo(java.lang.Class[] intfs)
                               throws IntrospectionException (src) 
Throws:
IntrospectionException (src)

getPreferedObjectName

public ObjectName (src)  getPreferedObjectName()

getDependsServices

public ObjectName (src) [] getDependsServices()