Spring Integration

org.springframework.integration.control
Class ControlBus

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

public class ControlBus
extends Object
implements BeanFactoryAware, 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 String DEFAULT_DOMAIN
           
static String TARGET_BEAN_NAME
           
 
Constructor Summary
ControlBus(MBeanServer server)
          Create a ControlBus that will register channels and endpoints as MBeans with the given MBeanServer using the default domain name.
ControlBus(MBeanServer server, 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()
           
protected  ObjectName generateObjectName(String beanName, Class<?> beanType)
           
 SubscribableChannel getOperationChannel()
          Returns the channel to which operation-invoking Messages may be sent.
 void setBeanFactory(BeanFactory beanFactory)
           
 void setObjectNameStaticProperties(Map<String,String> objectNameStaticProperties)
          Static properties that will be added to all object names.
 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 String DEFAULT_DOMAIN
See Also:
Constant Field Values

TARGET_BEAN_NAME

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

ControlBus

public ControlBus(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(MBeanServer server,
                  String domain)
Create a ControlBus that will register channels and endpoints as MBeans with the given MBeanServer using the specified domain name.

Method Detail

setObjectNameStaticProperties

public void setObjectNameStaticProperties(Map<String,String> objectNameStaticProperties)
Static properties that will be added to all object names.

Parameters:
objectNameStaticProperties - the objectNameStaticProperties to set

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(BeanFactory beanFactory)
                    throws BeansException
Specified by:
setBeanFactory in interface BeanFactoryAware
Throws:
BeansException

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

generateObjectName

protected ObjectName generateObjectName(String beanName,
                                        Class<?> beanType)
                                 throws MalformedObjectNameException
Throws:
MalformedObjectNameException

Spring Integration

Copyright © 2010. All Rights Reserved.