|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.remoting.support.RemoteAccessor
org.springframework.remoting.support.UrlBasedRemoteAccessor
org.springframework.remoting.support.RemoteInvocationBasedAccessor
org.logicblaze.lingo.jms.JmsClientInterceptor
public class JmsClientInterceptor
Interceptor for accessing a JMS based service which must be configured with a
LingoRemoteInvocationFactory instance.
RemoteAccessor.setServiceInterface(java.lang.Class),
UrlBasedRemoteAccessor.setServiceUrl(java.lang.String),
JmsServiceExporter,
JmsProxyFactoryBean| Field Summary |
|---|
| Fields inherited from class org.springframework.remoting.support.RemoteAccessor |
|---|
logger |
| Constructor Summary | |
|---|---|
JmsClientInterceptor()
|
|
JmsClientInterceptor(Requestor requestor)
|
|
JmsClientInterceptor(Requestor requestor,
LingoRemoteInvocationFactory factory)
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected AsyncReplyHandler |
createAsyncHandler(Object value)
|
protected MetadataStrategy |
createMetadataStrategy()
Factory method to create a default metadata strategy if none is configured |
protected LingoRemoteInvocationFactory |
createRemoteInvocationFactory()
Factory method to create a default lingo based invocation factory if none is configured |
protected Requestor |
createRequestor()
|
protected ResultJoinHandler |
createResultJoinHandler(org.aopalliance.intercept.MethodInvocation methodInvocation,
MethodMetadata metadata)
|
void |
destroy()
|
String |
getClientID()
|
ConnectionFactory |
getConnectionFactory()
|
Destination |
getDestination()
|
int |
getJmsExpiration()
|
int |
getJmsPriority()
|
String |
getJmsType()
|
Marshaller |
getMarshaller()
|
Map |
getMessageProperties()
|
MetadataStrategy |
getMetadataStrategy()
|
long |
getMultipleResponseTimeout()
|
JmsProducerConfig |
getProducerConfig()
|
long |
getRemoteReferenceTimeout()
|
Requestor |
getRequestor()
|
Destination |
getResponseDestination()
|
int |
getTimeToLive()
|
Object |
invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
|
protected boolean |
isMultipleResponse(org.aopalliance.intercept.MethodInvocation methodInvocation,
MethodMetadata metadata)
Returns true if this method expects multiple response messages such as when sending a message over a topic. |
boolean |
isMultipleResponsesExpected()
|
boolean |
isPersistentDelivery()
|
protected void |
populateHeaders(Message requestMessage)
|
protected Object |
recreateRemoteInvocationResult(org.springframework.remoting.support.RemoteInvocationResult result)
Recreate the invocation result contained in the given RemoteInvocationResult object. |
protected Object |
remoteReference(Class type,
Object value)
|
protected void |
replaceRemoteReferences(LingoInvocation invocation,
MethodMetadata metadata)
|
void |
setClientID(String clientID)
Sets the JMS connections unique clientID. |
void |
setConnectionFactory(ConnectionFactory connectionFactory)
Used to create a default Requestor if no requestor is explicitly
configured. |
void |
setCorrelationID(String correlationID)
|
void |
setDestination(Destination destination)
Sets the destination used to make requests |
void |
setJmsExpiration(int jmsExpiration)
Sets the JMS expiration timeout (in milliseconds) of the request message |
void |
setJmsPriority(int jmsPriority)
Sets the JMS priority of the request message |
void |
setJmsType(String jmsType)
Sets the JMS message type string which is appended to messages if set |
void |
setMarshaller(Marshaller marshaller)
|
void |
setMessageProperties(Map messageProperties)
Sets the message properties to be added to each message. |
void |
setMetadataStrategy(MetadataStrategy metadataStrategy)
|
void |
setMultipleResponsesExpected(boolean multipleResponsesExpected)
Sets whether or not multiple response messages are expected. |
void |
setMultipleResponseTimeout(long multipleResponseTimeout)
Sets the maximum amount of time to wait for multiple results to come back if communicating with multiple servers and aggregating together the results. |
void |
setPersistentDelivery(boolean persistent)
Sets the delivery mode to be persistent or non-persistent. |
void |
setProducerConfig(JmsProducerConfig producerConfig)
Sets the configuration of the producer used to send back responses |
void |
setRemoteReferenceTimeout(long remoteReferenceTimeout)
Sets the maximum amount of time an inactive remote object reference will keep around until it is garbage collected. |
void |
setRequestor(Requestor requestor)
|
void |
setResponseDestination(Destination responseDestination)
Sets the destination used to consume responses on - or null and a temporary queue will be created. |
void |
setTimeToLive(int timeToLive)
Sets the time to live on each message request |
| Methods inherited from class org.springframework.remoting.support.RemoteInvocationBasedAccessor |
|---|
createRemoteInvocation, getRemoteInvocationFactory, setRemoteInvocationFactory |
| Methods inherited from class org.springframework.remoting.support.UrlBasedRemoteAccessor |
|---|
getServiceUrl, setServiceUrl |
| Methods inherited from class org.springframework.remoting.support.RemoteAccessor |
|---|
getServiceInterface, setServiceInterface |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JmsClientInterceptor()
public JmsClientInterceptor(Requestor requestor)
public JmsClientInterceptor(Requestor requestor,
LingoRemoteInvocationFactory factory)
| Method Detail |
|---|
public void afterPropertiesSet()
throws JMSException
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanJMSException
public Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
throws Throwable
invoke in interface org.aopalliance.intercept.MethodInterceptorThrowable
public void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic Requestor getRequestor()
public void setRequestor(Requestor requestor)
public Destination getDestination()
public void setDestination(Destination destination)
destination - public Destination getResponseDestination()
public void setResponseDestination(Destination responseDestination)
responseDestination - public void setCorrelationID(String correlationID)
public String getJmsType()
public void setJmsType(String jmsType)
public Map getMessageProperties()
public int getJmsExpiration()
public void setJmsExpiration(int jmsExpiration)
public int getJmsPriority()
public void setJmsPriority(int jmsPriority)
public int getTimeToLive()
public void setTimeToLive(int timeToLive)
public void setMessageProperties(Map messageProperties)
public Marshaller getMarshaller()
public void setMarshaller(Marshaller marshaller)
public ConnectionFactory getConnectionFactory()
public void setConnectionFactory(ConnectionFactory connectionFactory)
Requestor if no requestor is explicitly
configured.
public JmsProducerConfig getProducerConfig()
public void setProducerConfig(JmsProducerConfig producerConfig)
public boolean isPersistentDelivery()
public void setPersistentDelivery(boolean persistent)
public String getClientID()
public void setClientID(String clientID)
public MetadataStrategy getMetadataStrategy()
public void setMetadataStrategy(MetadataStrategy metadataStrategy)
public boolean isMultipleResponsesExpected()
public void setMultipleResponsesExpected(boolean multipleResponsesExpected)
getDestination()
method returns a Topic but there could be circumstances when
sending a request to a queue results in messages being fanned out to many
servers which could all respond.
public long getRemoteReferenceTimeout()
public void setRemoteReferenceTimeout(long remoteReferenceTimeout)
public long getMultipleResponseTimeout()
public void setMultipleResponseTimeout(long multipleResponseTimeout)
protected boolean isMultipleResponse(org.aopalliance.intercept.MethodInvocation methodInvocation,
MethodMetadata metadata)
protected void populateHeaders(Message requestMessage)
throws JMSException
JMSException
protected Object recreateRemoteInvocationResult(org.springframework.remoting.support.RemoteInvocationResult result)
throws Throwable
Can be overridden in subclass to provide custom recreation, potentially processing the returned result object.
recreateRemoteInvocationResult in class org.springframework.remoting.support.RemoteInvocationBasedAccessorresult - the RemoteInvocationResult to recreate
Throwable - if the invocation result is an exceptionRemoteInvocationResult.recreate()
protected void replaceRemoteReferences(LingoInvocation invocation,
MethodMetadata metadata)
protected Object remoteReference(Class type,
Object value)
protected ResultJoinHandler createResultJoinHandler(org.aopalliance.intercept.MethodInvocation methodInvocation,
MethodMetadata metadata)
protected AsyncReplyHandler createAsyncHandler(Object value)
protected Requestor createRequestor()
throws JMSException
JMSExceptionprotected LingoRemoteInvocationFactory createRemoteInvocationFactory()
protected MetadataStrategy createMetadataStrategy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||