Polish Javadoc for JmsInvokerClientInterceptor

This commit is contained in:
Sam Brannen
2015-02-19 22:15:51 +01:00
parent 8fcbdaee24
commit 53c2531a8b

View File

@@ -108,7 +108,7 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
/**
* Set the name of target queue to send invoker requests to.
* The specified name will be dynamically resolved via the
* <p>The specified name will be dynamically resolved via the
* {@link #setDestinationResolver DestinationResolver}.
*/
public void setQueueName(String queueName) {
@@ -118,8 +118,8 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
/**
* Set the DestinationResolver that is to be used to resolve Queue
* references for this accessor.
* <p>The default resolver is a DynamicDestinationResolver. Specify a
* JndiDestinationResolver for resolving destination names as JNDI locations.
* <p>The default resolver is a {@code DynamicDestinationResolver}. Specify a
* {@code JndiDestinationResolver} for resolving destination names as JNDI locations.
* @see org.springframework.jms.support.destination.DynamicDestinationResolver
* @see org.springframework.jms.support.destination.JndiDestinationResolver
*/
@@ -129,8 +129,8 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
}
/**
* Set the RemoteInvocationFactory to use for this accessor.
* Default is a {@link org.springframework.remoting.support.DefaultRemoteInvocationFactory}.
* Set the {@link RemoteInvocationFactory} to use for this accessor.
* <p>Default is a {@link DefaultRemoteInvocationFactory}.
* <p>A custom invocation factory can add further context information
* to the invocation, for example user credentials.
*/
@@ -140,16 +140,16 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
}
/**
* Specify the MessageConverter to use for turning
* Specify the {@link MessageConverter} to use for turning
* {@link org.springframework.remoting.support.RemoteInvocation}
* objects into request messages, as well as response messages into
* {@link org.springframework.remoting.support.RemoteInvocationResult} objects.
* <p>Default is a {@link org.springframework.jms.support.converter.SimpleMessageConverter},
* using a standard JMS {@link javax.jms.ObjectMessage} for each invocation /
* invocation result object.
* <p>Custom implementations may generally adapt Serializables into
* special kinds of messages, or might be specifically tailored for
* translating RemoteInvocation(Result)s into specific kinds of messages.
* <p>Default is a {@link SimpleMessageConverter}, using a standard JMS
* {@link javax.jms.ObjectMessage} for each invocation / invocation result
* object.
* <p>Custom implementations may generally adapt {@link java.io.Serializable}
* objects into special kinds of messages, or might be specifically tailored for
* translating {@code RemoteInvocation(Result)s} into specific kinds of messages.
*/
public void setMessageConverter(MessageConverter messageConverter) {
this.messageConverter = (messageConverter != null ? messageConverter : new SimpleMessageConverter());
@@ -215,11 +215,11 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
}
/**
* Create a new RemoteInvocation object for the given AOP method invocation.
* The default implementation delegates to the RemoteInvocationFactory.
* <p>Can be overridden in subclasses to provide custom RemoteInvocation
* Create a new {@code RemoteInvocation} object for the given AOP method invocation.
* <p>The default implementation delegates to the {@link RemoteInvocationFactory}.
* <p>Can be overridden in subclasses to provide custom {@code RemoteInvocation}
* subclasses, containing additional invocation parameters like user credentials.
* Note that it is preferable to use a custom RemoteInvocationFactory which
* Note that it is preferable to use a custom {@code RemoteInvocationFactory} which
* is a reusable strategy.
* @param methodInvocation the current AOP method invocation
* @return the RemoteInvocation object
@@ -307,7 +307,7 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
/**
* Create the invoker request message.
* <p>The default implementation creates a JMS ObjectMessage
* <p>The default implementation creates a JMS {@link javax.jms.ObjectMessage}
* for the given RemoteInvocation object.
* @param session the current JMS Session
* @param invocation the remote invocation to send
@@ -353,9 +353,9 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
/**
* Extract the invocation result from the response message.
* <p>The default implementation expects a JMS ObjectMessage carrying
* a RemoteInvocationResult object. If an invalid response message is
* encountered, the {@code onInvalidResponse} callback gets invoked.
* <p>The default implementation expects a JMS {@link javax.jms.ObjectMessage}
* carrying a {@link RemoteInvocationResult} object. If an invalid response
* message is encountered, the {@code onInvalidResponse} callback gets invoked.
* @param responseMessage the response message
* @return the invocation result
* @throws JMSException is thrown if a JMS exception occurs
@@ -370,10 +370,10 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
}
/**
* Callback that is invoked by {@code executeRequest} when the receive
* timeout has expired for the specified {@link RemoteInvocation}
* Callback that is invoked by {@link #executeRequest} when the receive
* timeout has expired for the specified {@link RemoteInvocation}.
* <p>By default, an {@link RemoteTimeoutException} is thrown. Sub-classes
* can choose to either throw a more dedicated exception or event return
* can choose to either throw a more dedicated exception or even return
* a default {@link RemoteInvocationResult} as a fallback.
* @param invocation the invocation
* @return a default result when the receive timeout has expired
@@ -383,14 +383,14 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
}
/**
* Callback that is invoked by {@code extractInvocationResult}
* when it encounters an invalid response message.
* <p>The default implementation throws a MessageFormatException.
* Callback that is invoked by {@link #extractInvocationResult} when
* it encounters an invalid response message.
* <p>The default implementation throws a {@link MessageFormatException}.
* @param responseMessage the invalid response message
* @return an alternative invocation result that should be
* returned to the caller (if desired)
* @throws JMSException if the invalid response should lead
* to an infrastructure exception propagated to the caller
* @return an alternative invocation result that should be returned to
* the caller (if desired)
* @throws JMSException if the invalid response should lead to an
* infrastructure exception propagated to the caller
* @see #extractInvocationResult
*/
protected RemoteInvocationResult onInvalidResponse(Message responseMessage) throws JMSException {
@@ -398,9 +398,10 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
}
/**
* Recreate the invocation result contained in the given RemoteInvocationResult
* object. The default implementation calls the default recreate method.
* <p>Can be overridden in subclass to provide custom recreation, potentially
* Recreate the invocation result contained in the given {@link RemoteInvocationResult}
* object.
* <p>The default implementation calls the default {@code recreate()} method.
* <p>Can be overridden in subclasses to provide custom recreation, potentially
* processing the returned result object.
* @param result the RemoteInvocationResult to recreate
* @return a return value if the invocation result is a successful return
@@ -413,7 +414,7 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
/**
* Convert the given JMS invoker access exception to an appropriate
* Spring RemoteAccessException.
* Spring {@link RemoteAccessException}.
* @param ex the exception to convert
* @return the RemoteAccessException to throw
*/