org.apache.servicemix.bean
Class BeanEndpoint
java.lang.Object
org.apache.servicemix.common.Endpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ProviderEndpoint
org.apache.servicemix.bean.BeanEndpoint
- All Implemented Interfaces:
- ExchangeProcessor, org.springframework.context.ApplicationContextAware
public class BeanEndpoint
- extends ProviderEndpoint
- implements org.springframework.context.ApplicationContextAware
Represents a bean endpoint which consists of a together with a MethodInvocationStrategy
so that JBI message exchanges can be invoked on the bean.
- Version:
- $Revision: $
| Methods inherited from class org.apache.servicemix.common.Endpoint |
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString, validate |
BeanEndpoint
public BeanEndpoint()
BeanEndpoint
public BeanEndpoint(BeanComponent component,
ServiceEndpoint serviceEndpoint)
start
public void start()
throws Exception
- Specified by:
start in interface ExchangeProcessor- Overrides:
start in class ProviderEndpoint
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop in interface ExchangeProcessor- Overrides:
stop in class ProviderEndpoint
- Throws:
Exception
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
getBeanName
public String getBeanName()
setBeanName
public void setBeanName(String beanName)
getBean
public Object getBean()
setBean
public void setBean(Object bean)
getBeanType
public Class<?> getBeanType()
- Returns:
- the beanType
setBeanType
public void setBeanType(Class<?> beanType)
- Parameters:
beanType - the beanType to set
getBeanClassName
public String getBeanClassName()
- Returns:
- the beanClassName
setBeanClassName
public void setBeanClassName(String beanClassName)
- Parameters:
beanClassName - the beanClassName to set
getBeanInfo
public BeanInfo getBeanInfo()
setBeanInfo
public void setBeanInfo(BeanInfo beanInfo)
getMethodInvocationStrategy
public MethodInvocationStrategy getMethodInvocationStrategy()
setMethodInvocationStrategy
public void setMethodInvocationStrategy(MethodInvocationStrategy methodInvocationStrategy)
process
public void process(MessageExchange exchange)
throws Exception
- Specified by:
process in interface ExchangeProcessor- Overrides:
process in class ProviderEndpoint
- Throws:
Exception
onProviderExchange
protected void onProviderExchange(MessageExchange exchange)
throws Exception
- Throws:
Exception
onConsumerExchange
protected void onConsumerExchange(MessageExchange exchange)
throws Exception
- Throws:
Exception
getCorrelation
protected Object getCorrelation(MessageExchange exchange)
throws MessagingException
- Throws:
MessagingException
createBean
protected Object createBean()
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
- Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
createMethodInvocationStrategy
protected MethodInvocationStrategy createMethodInvocationStrategy()
injectBean
protected void injectBean(Object target)
- A strategy method to allow implementations to perform some custom JBI based injection of the POJO
- Parameters:
target - the bean to be injected
evaluateCallbacks
protected void evaluateCallbacks(Request req)
send
public Future<NormalizedMessage> send(String uri,
NormalizedMessage message)
- Used by POJOs acting as a consumer
- Parameters:
uri - message -
- Returns:
checkEndOfRequest
protected void checkEndOfRequest(Request request,
Object corId)
getCorrelationExpression
public Expression getCorrelationExpression()
- Returns:
- the correlationExpression
setCorrelationExpression
public void setCorrelationExpression(Expression correlationExpression)
- Parameters:
correlationExpression - the correlationExpression to set
Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.