|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.common.endpoints.AbstractEndpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ProviderEndpoint
org.apache.servicemix.bean.BeanEndpoint
public class BeanEndpoint
Represents a bean endpoint which consists of a together with a MethodInvocationStrategy
so that JBI message exchanges can be invoked on the bean.
| Nested Class Summary | |
|---|---|
protected class |
BeanEndpoint.PojoChannel
|
protected class |
BeanEndpoint.PojoContext
|
| Field Summary | |
|---|---|
static java.lang.String |
CORRELATION_ID
Property name for the correlation id that is being set on exchanges by the BeanEndpoint |
| Fields inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint |
|---|
logger |
| Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
|---|
definition, description, endpoint, interfaceName, service, serviceUnit |
| Constructor Summary | |
|---|---|
BeanEndpoint()
|
|
BeanEndpoint(BeanComponent component,
javax.jbi.servicedesc.ServiceEndpoint serviceEndpoint)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.apache.servicemix.common.endpoints.ProviderEndpoint |
|---|
activate, deactivate, getRole, processInOnly, processInOut |
| Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint |
|---|
done, fail, getChannel, getContext, getExchangeFactory, sendSync |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CORRELATION_ID
| Constructor Detail |
|---|
public BeanEndpoint()
public BeanEndpoint(BeanComponent component,
javax.jbi.servicedesc.ServiceEndpoint serviceEndpoint)
| Method Detail |
|---|
public void start()
throws java.lang.Exception
start in interface Endpointstart in class SimpleEndpointjava.lang.Exception
public 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 strategy
public void process(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
process in interface Endpointprocess in class ProviderEndpointjava.lang.Exception
protected 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.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
javax.jbi.messaging.MessagingException
protected Request getRequest(javax.jbi.messaging.MessageExchange exchange)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
protected void onConsumerExchange(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
java.lang.Exception
protected java.lang.Object getCorrelation(javax.jbi.messaging.MessageExchange exchange)
throws javax.jbi.messaging.MessagingException
javax.jbi.messaging.MessagingException
protected java.lang.Object createBean()
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.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 set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||