org.apache.servicemix.bean
Class BeanEndpoint
java.lang.Object
org.apache.servicemix.common.endpoints.AbstractEndpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ProviderEndpoint
org.apache.servicemix.bean.BeanEndpoint
- All Implemented Interfaces:
- Endpoint, 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.endpoints.AbstractEndpoint |
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString, validate |
BeanEndpoint
public BeanEndpoint()
BeanEndpoint
public BeanEndpoint(BeanComponent component,
javax.jbi.servicedesc.ServiceEndpoint serviceEndpoint)
start
public void start()
throws Exception
- Specified by:
start in interface Endpoint- Overrides:
start in class SimpleEndpoint
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop in interface Endpoint- Overrides:
stop in class SimpleEndpoint
- 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(javax.jbi.messaging.MessageExchange exchange)
throws Exception
- Specified by:
process in interface Endpoint- Overrides:
process in class ProviderEndpoint
- Throws:
Exception
onProviderExchange
protected void onProviderExchange(javax.jbi.messaging.MessageExchange exchange)
throws Exception
- Throws:
Exception
getOrCreateCurrentRequest
protected Request getOrCreateCurrentRequest(javax.jbi.messaging.MessageExchange exchange)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
javax.jbi.messaging.MessagingException
- Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
javax.jbi.messaging.MessagingException
onConsumerExchange
protected void onConsumerExchange(javax.jbi.messaging.MessageExchange exchange)
throws Exception
- Throws:
Exception
getCorrelation
protected Object getCorrelation(javax.jbi.messaging.MessageExchange exchange)
throws javax.jbi.messaging.MessagingException
- Throws:
javax.jbi.messaging.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<javax.jbi.messaging.NormalizedMessage> send(String uri,
javax.jbi.messaging.NormalizedMessage message)
- Used by POJOs acting as a consumer
- Parameters:
uri - message -
- Returns:
checkEndOfRequest
protected void checkEndOfRequest(Request request,
Object corId)
getCorrelationExpression
public org.apache.servicemix.expression.Expression getCorrelationExpression()
- Returns:
- the correlationExpression
setCorrelationExpression
public void setCorrelationExpression(org.apache.servicemix.expression.Expression correlationExpression)
- Parameters:
correlationExpression - the correlationExpression to set
Copyright © 2005-2008 The Apache Software Foundation. All Rights Reserved.