public class BeanEndpoint extends ProviderEndpoint implements org.springframework.context.ApplicationContextAware
MethodInvocationStrategy
so that JBI message exchanges can be invoked on the bean.| Modifier and Type | Class and Description |
|---|---|
protected class |
BeanEndpoint.PojoChannel |
protected class |
BeanEndpoint.PojoContext |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CORRELATION_ID
Property name for the correlation id that is being set on exchanges by the BeanEndpoint
|
loggerdefinition, description, endpoint, interfaceName, service, serviceUnit| Constructor and Description |
|---|
BeanEndpoint() |
BeanEndpoint(BeanComponent component,
javax.jbi.servicedesc.ServiceEndpoint serviceEndpoint) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkEndOfRequest(Request req)
Checks if the request has ended.
|
protected java.lang.Object |
createBean() |
protected MethodInvocationStrategy |
createMethodInvocationStrategy() |
protected void |
evaluateCallbacks(Request req) |
org.springframework.context.ApplicationContext |
getApplicationContext() |
java.lang.Object |
getBean() |
java.lang.String |
getBeanClassName() |
BeanInfo |
getBeanInfo() |
java.lang.String |
getBeanName() |
java.lang.Class<?> |
getBeanType() |
protected java.lang.Object |
getCorrelation(javax.jbi.messaging.MessageExchange exchange) |
org.apache.servicemix.expression.Expression |
getCorrelationExpression() |
MethodInvocationStrategy |
getMethodInvocationStrategy() |
protected Request |
getOrCreateCurrentRequest(javax.jbi.messaging.MessageExchange exchange) |
protected Request |
getRequest(javax.jbi.messaging.MessageExchange exchange) |
protected void |
injectBean(java.lang.Object target)
A strategy method to allow implementations to perform some custom JBI based injection of the POJO
|
protected void |
onConsumerExchange(javax.jbi.messaging.MessageExchange exchange) |
protected void |
onProviderExchange(javax.jbi.messaging.MessageExchange exchange) |
protected boolean |
onProviderExchangeDone(javax.jbi.messaging.MessageExchange exchange) |
void |
process(javax.jbi.messaging.MessageExchange exchange) |
protected void |
send(javax.jbi.messaging.MessageExchange me) |
java.util.concurrent.Future<javax.jbi.messaging.NormalizedMessage> |
send(java.lang.String uri,
javax.jbi.messaging.NormalizedMessage message)
Used by POJOs acting as a consumer
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Set the Spring ApplicationContext where the bean can be found.
|
void |
setBean(java.lang.Object bean)
Set the bean to be used for handling exchanges
|
void |
setBeanClassName(java.lang.String beanClassName)
Set the bean class name to be used for handling exchanges.
|
void |
setBeanInfo(BeanInfo beanInfo)
Set a custom bean info object to define the bean to be used for handling exchanges
|
void |
setBeanName(java.lang.String beanName)
Set the name of the bean in the application context to be used for handling exchanges
|
void |
setBeanType(java.lang.Class<?> beanType)
Set the bean class to be used for handling exchanges.
|
void |
setCorrelationExpression(org.apache.servicemix.expression.Expression correlationExpression)
Set a custom expression to use for correlating exchanges into a single request handled by the same bean instance.
|
void |
setMethodInvocationStrategy(MethodInvocationStrategy methodInvocationStrategy)
Set a custom invocation strategy to define how the bean is being invoked.
|
void |
start() |
void |
stop() |
activate, deactivate, getRole, processInOnly, processInOutdone, fail, getChannel, getContext, getExchangeFactory, sendSyncgetDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString, validatepublic static final java.lang.String CORRELATION_ID
public BeanEndpoint()
public BeanEndpoint(BeanComponent component, javax.jbi.servicedesc.ServiceEndpoint serviceEndpoint)
public void start()
throws java.lang.Exception
start in interface Endpointstart in class SimpleEndpointjava.lang.Exceptionpublic void stop()
throws java.lang.Exception
stop in interface Endpointstop in class SimpleEndpointjava.lang.Exceptionpublic org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareapplicationContext - org.springframework.beans.BeansExceptionpublic java.lang.String getBeanName()
public void setBeanName(java.lang.String beanName)
beanName - public java.lang.Object getBean()
public void setBean(java.lang.Object bean)
bean - public java.lang.Class<?> getBeanType()
public void setBeanType(java.lang.Class<?> beanType)
beanType - the beanType to setpublic java.lang.String getBeanClassName()
public void setBeanClassName(java.lang.String beanClassName)
beanClassName - the beanClassName to setpublic BeanInfo getBeanInfo()
public void setBeanInfo(BeanInfo beanInfo)
beanInfo - public MethodInvocationStrategy getMethodInvocationStrategy()
public void setMethodInvocationStrategy(MethodInvocationStrategy methodInvocationStrategy)
methodInvocationStrategy - the strategypublic void process(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
process in interface Endpointprocess in class ProviderEndpointjava.lang.Exceptionprotected void onProviderExchange(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
java.lang.Exceptionprotected boolean onProviderExchangeDone(javax.jbi.messaging.MessageExchange exchange)
protected Request getOrCreateCurrentRequest(javax.jbi.messaging.MessageExchange exchange) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, javax.jbi.messaging.MessagingException
java.lang.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjavax.jbi.messaging.MessagingExceptionprotected Request getRequest(javax.jbi.messaging.MessageExchange exchange) throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingExceptionprotected void onConsumerExchange(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.Object getCorrelation(javax.jbi.messaging.MessageExchange exchange)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingExceptionprotected java.lang.Object createBean()
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
java.lang.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionprotected MethodInvocationStrategy createMethodInvocationStrategy()
protected void injectBean(java.lang.Object target)
target - the bean to be injectedprotected void evaluateCallbacks(Request req)
public java.util.concurrent.Future<javax.jbi.messaging.NormalizedMessage> send(java.lang.String uri,
javax.jbi.messaging.NormalizedMessage message)
uri - message - protected void send(javax.jbi.messaging.MessageExchange me)
throws javax.jbi.messaging.MessagingException
send in class SimpleEndpointjavax.jbi.messaging.MessagingExceptionprotected void checkEndOfRequest(Request req)
req - the Request instance to checkpublic org.apache.servicemix.expression.Expression getCorrelationExpression()
public void setCorrelationExpression(org.apache.servicemix.expression.Expression correlationExpression)
correlationExpression - the correlationExpression to setCopyright © 2005-2015 FuseSource. All Rights Reserved.