org.servicemix.jboss.deployment
Class JBIDeployer

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.servicemix.jboss.deployment.JBIDeployer
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.deployment.SubDeployer, org.jboss.deployment.SubDeployerMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean, JBIDeployerMBean

public class JBIDeployer
extends org.jboss.deployment.SubDeployerSupport
implements org.jboss.deployment.SubDeployer, JBIDeployerMBean

This is the deployer that handles picking up and deploying a JBI package out to the ServiceMix container.

Author:
Philip Dodds

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.deployment.SubDeployerSupport
org.jboss.deployment.SubDeployerSupport.ClassConfiguration
 
Field Summary
 
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.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
 
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
 
Constructor Summary
JBIDeployer()
           
 
Method Summary
 boolean accepts(org.jboss.deployment.DeploymentInfo di)
          Returns true if this deployer can deploy the given DeploymentInfo, for the time being we look for the extension iar.
 void create(org.jboss.deployment.DeploymentInfo di)
          Describe create method here.
 void destroy()
           
 void destroy(org.jboss.deployment.DeploymentInfo di)
          The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.
 javax.management.ObjectName getDeploymentService()
          Gets the JBI deployment service object name
 javax.management.ObjectName getJBIContainer()
          Gets the ObjectName of the JBI Container's MBean
 org.jboss.deployment.DeploymentInfo getService(javax.management.ObjectName serviceName)
          The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.
 void init(org.jboss.deployment.DeploymentInfo di)
          Describe init method here.
protected  void initLoaderRepository(org.jboss.deployment.DeploymentInfo di)
          Add the jbi scoped repository
 void setDeploymentService(javax.management.ObjectName deploymentService)
          Sets the JBI deployment service object name
 void setJBIContainer(javax.management.ObjectName jbiContainerMBean)
          Sets the ObjectName of the JBI Container's MBean
 void start(org.jboss.deployment.DeploymentInfo di)
          The start method starts all the mbeans in this DeploymentInfo..
 void stop(org.jboss.deployment.DeploymentInfo di)
          The stop method invokes stop on the mbeans associatedw ith the deployment in reverse order relative to create.
 
Methods inherited from class org.jboss.deployment.SubDeployerSupport
addDeployableFiles, addDeployableJar, createService, deployUrl, destroyService, emitNotification, getRelativeOrder, getSuffixes, isDeployable, processNestedDeployments, setRelativeOrder, setSuffixes, startService, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, 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.SubDeployer
getRelativeOrder, getServiceName, getSuffixes, setRelativeOrder, setSuffixes
 
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, start, stop
 

Constructor Detail

JBIDeployer

public JBIDeployer()
Method Detail

accepts

public boolean accepts(org.jboss.deployment.DeploymentInfo di)
Returns true if this deployer can deploy the given DeploymentInfo, for the time being we look for the extension iar.

Specified by:
accepts in interface org.jboss.deployment.SubDeployer
Specified by:
accepts in interface org.jboss.deployment.SubDeployerMBean
Specified by:
accepts in interface JBIDeployerMBean
Returns:
True if this deployer can deploy the given DeploymentInfo.

create

public void create(org.jboss.deployment.DeploymentInfo di)
            throws org.jboss.deployment.DeploymentException
Describe create method here.

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

destroy

public void destroy()
Specified by:
destroy in interface org.jboss.system.Service
Overrides:
destroy in class org.jboss.system.ServiceMBeanSupport

destroy

public void destroy(org.jboss.deployment.DeploymentInfo di)
The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.

Specified by:
destroy in interface org.jboss.deployment.SubDeployer
Specified by:
destroy in interface org.jboss.deployment.SubDeployerMBean
Specified by:
destroy in interface JBIDeployerMBean
Overrides:
destroy in class org.jboss.deployment.SubDeployerSupport
Parameters:
di - a DeploymentInfo value

getDeploymentService

public javax.management.ObjectName getDeploymentService()
Gets the JBI deployment service object name

Returns:
The JBI deployment service object name

getJBIContainer

public javax.management.ObjectName getJBIContainer()
Gets the ObjectName of the JBI Container's MBean

Specified by:
getJBIContainer in interface JBIDeployerMBean
Returns:
The ObjectName of the JBI Container MBean

getService

public org.jboss.deployment.DeploymentInfo getService(javax.management.ObjectName serviceName)
The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.

Specified by:
getService in interface JBIDeployerMBean
Parameters:
serviceName - a service object name
Returns:
The associated service DeploymentInfo if found, null otherwise

init

public void init(org.jboss.deployment.DeploymentInfo di)
          throws org.jboss.deployment.DeploymentException
Describe init method here.

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

setDeploymentService

public void setDeploymentService(javax.management.ObjectName deploymentService)
Sets the JBI deployment service object name

Parameters:
deploymentService -

setJBIContainer

public void setJBIContainer(javax.management.ObjectName jbiContainerMBean)
Sets the ObjectName of the JBI Container's MBean

Specified by:
setJBIContainer in interface JBIDeployerMBean
Parameters:
jbiContainerMBean - The ObjectName of the JBI Container's MBean

start

public void start(org.jboss.deployment.DeploymentInfo di)
           throws org.jboss.deployment.DeploymentException
The start method starts all the mbeans in this DeploymentInfo..

Specified by:
start in interface org.jboss.deployment.SubDeployer
Specified by:
start in interface org.jboss.deployment.SubDeployerMBean
Specified by:
start in interface JBIDeployerMBean
Overrides:
start in class org.jboss.deployment.SubDeployerSupport
Parameters:
di - a DeploymentInfo value
Throws:
org.jboss.deployment.DeploymentException - if an error occurs

stop

public void stop(org.jboss.deployment.DeploymentInfo di)
The stop method invokes stop on the mbeans associatedw ith the deployment in reverse order relative to create.

Specified by:
stop in interface org.jboss.deployment.SubDeployer
Specified by:
stop in interface org.jboss.deployment.SubDeployerMBean
Specified by:
stop in interface JBIDeployerMBean
Overrides:
stop in class org.jboss.deployment.SubDeployerSupport
Parameters:
di - the DeploymentInfo value to stop.

initLoaderRepository

protected void initLoaderRepository(org.jboss.deployment.DeploymentInfo di)
                             throws java.lang.Exception
Add the jbi scoped repository

Parameters:
di - the deployment info passed to deploy
Throws:
java.lang.Exception


Copyright © 2005-2011 FuseSource. All Rights Reserved.