org.springframework.integration.control
Class ControlBus

java.lang.Object
  extended by org.springframework.integration.control.ControlBus
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean

public class ControlBus
extends java.lang.Object
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean

JMX-based Control Bus implementation. Exports all channel and endpoint beans from a given BeanFactory as MBeans.

Since:
2.0
Author:
Mark Fisher

Field Summary
static java.lang.String DEFAULT_DOMAIN
           
static java.lang.String TARGET_BEAN_NAME
           
 
Constructor Summary
ControlBus(javax.management.MBeanServer server)
          Create a ControlBus that will register channels and endpoints as MBeans with the given MBeanServer using the default domain name.
ControlBus(javax.management.MBeanServer server, java.lang.String domain)
          Create a ControlBus that will register channels and endpoints as MBeans with the given MBeanServer using the specified domain name.
 
Method Summary
 void afterPropertiesSet()
           
 SubscribableChannel getOperationChannel()
          Returns the channel to which operation-invoking Messages may be sent.
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 void setOperationChannel(SubscribableChannel operationChannel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DOMAIN

public static final java.lang.String DEFAULT_DOMAIN
See Also:
Constant Field Values

TARGET_BEAN_NAME

public static final java.lang.String TARGET_BEAN_NAME
See Also:
Constant Field Values
Constructor Detail

ControlBus

public ControlBus(javax.management.MBeanServer server)
Create a ControlBus that will register channels and endpoints as MBeans with the given MBeanServer using the default domain name.

See Also:
DEFAULT_DOMAIN

ControlBus

public ControlBus(javax.management.MBeanServer server,
                  java.lang.String domain)
Create a ControlBus that will register channels and endpoints as MBeans with the given MBeanServer using the specified domain name.

Method Detail

setOperationChannel

public void setOperationChannel(SubscribableChannel operationChannel)

getOperationChannel

public SubscribableChannel getOperationChannel()
Returns the channel to which operation-invoking Messages may be sent. Any messages sent to this channel must contain TARGET_BEAN_NAME and JmxHeaders.OPERATION_NAME header values, and the target bean name must match one that has been exported by this Control Bus. If the operation returns a result, the MessageHeaders.REPLY_CHANNEL header is also required.


setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
                    throws org.springframework.beans.BeansException
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
Throws:
org.springframework.beans.BeansException

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception