Skip to content

Commit 53c2531

Browse files
committed
Polish Javadoc for JmsInvokerClientInterceptor
1 parent 8fcbdae commit 53c2531

File tree

1 file changed

+35
-34
lines changed

1 file changed

+35
-34
lines changed

spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerClientInterceptor.java

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void setQueue(Queue queue) {
108108

109109
/**
110110
* Set the name of target queue to send invoker requests to.
111-
* The specified name will be dynamically resolved via the
111+
* <p>The specified name will be dynamically resolved via the
112112
* {@link #setDestinationResolver DestinationResolver}.
113113
*/
114114
public void setQueueName(String queueName) {
@@ -118,8 +118,8 @@ public void setQueueName(String queueName) {
118118
/**
119119
* Set the DestinationResolver that is to be used to resolve Queue
120120
* references for this accessor.
121-
* <p>The default resolver is a DynamicDestinationResolver. Specify a
122-
* JndiDestinationResolver for resolving destination names as JNDI locations.
121+
* <p>The default resolver is a {@code DynamicDestinationResolver}. Specify a
122+
* {@code JndiDestinationResolver} for resolving destination names as JNDI locations.
123123
* @see org.springframework.jms.support.destination.DynamicDestinationResolver
124124
* @see org.springframework.jms.support.destination.JndiDestinationResolver
125125
*/
@@ -129,8 +129,8 @@ public void setDestinationResolver(DestinationResolver destinationResolver) {
129129
}
130130

131131
/**
132-
* Set the RemoteInvocationFactory to use for this accessor.
133-
* Default is a {@link org.springframework.remoting.support.DefaultRemoteInvocationFactory}.
132+
* Set the {@link RemoteInvocationFactory} to use for this accessor.
133+
* <p>Default is a {@link DefaultRemoteInvocationFactory}.
134134
* <p>A custom invocation factory can add further context information
135135
* to the invocation, for example user credentials.
136136
*/
@@ -140,16 +140,16 @@ public void setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationF
140140
}
141141

142142
/**
143-
* Specify the MessageConverter to use for turning
143+
* Specify the {@link MessageConverter} to use for turning
144144
* {@link org.springframework.remoting.support.RemoteInvocation}
145145
* objects into request messages, as well as response messages into
146146
* {@link org.springframework.remoting.support.RemoteInvocationResult} objects.
147-
* <p>Default is a {@link org.springframework.jms.support.converter.SimpleMessageConverter},
148-
* using a standard JMS {@link javax.jms.ObjectMessage} for each invocation /
149-
* invocation result object.
150-
* <p>Custom implementations may generally adapt Serializables into
151-
* special kinds of messages, or might be specifically tailored for
152-
* translating RemoteInvocation(Result)s into specific kinds of messages.
147+
* <p>Default is a {@link SimpleMessageConverter}, using a standard JMS
148+
* {@link javax.jms.ObjectMessage} for each invocation / invocation result
149+
* object.
150+
* <p>Custom implementations may generally adapt {@link java.io.Serializable}
151+
* objects into special kinds of messages, or might be specifically tailored for
152+
* translating {@code RemoteInvocation(Result)s} into specific kinds of messages.
153153
*/
154154
public void setMessageConverter(MessageConverter messageConverter) {
155155
this.messageConverter = (messageConverter != null ? messageConverter : new SimpleMessageConverter());
@@ -215,11 +215,11 @@ public Object invoke(MethodInvocation methodInvocation) throws Throwable {
215215
}
216216

217217
/**
218-
* Create a new RemoteInvocation object for the given AOP method invocation.
219-
* The default implementation delegates to the RemoteInvocationFactory.
220-
* <p>Can be overridden in subclasses to provide custom RemoteInvocation
218+
* Create a new {@code RemoteInvocation} object for the given AOP method invocation.
219+
* <p>The default implementation delegates to the {@link RemoteInvocationFactory}.
220+
* <p>Can be overridden in subclasses to provide custom {@code RemoteInvocation}
221221
* subclasses, containing additional invocation parameters like user credentials.
222-
* Note that it is preferable to use a custom RemoteInvocationFactory which
222+
* Note that it is preferable to use a custom {@code RemoteInvocationFactory} which
223223
* is a reusable strategy.
224224
* @param methodInvocation the current AOP method invocation
225225
* @return the RemoteInvocation object
@@ -307,7 +307,7 @@ protected Queue resolveQueueName(Session session, String queueName) throws JMSEx
307307

308308
/**
309309
* Create the invoker request message.
310-
* <p>The default implementation creates a JMS ObjectMessage
310+
* <p>The default implementation creates a JMS {@link javax.jms.ObjectMessage}
311311
* for the given RemoteInvocation object.
312312
* @param session the current JMS Session
313313
* @param invocation the remote invocation to send
@@ -353,9 +353,9 @@ protected Message doExecuteRequest(Session session, Queue queue, Message request
353353

354354
/**
355355
* Extract the invocation result from the response message.
356-
* <p>The default implementation expects a JMS ObjectMessage carrying
357-
* a RemoteInvocationResult object. If an invalid response message is
358-
* encountered, the {@code onInvalidResponse} callback gets invoked.
356+
* <p>The default implementation expects a JMS {@link javax.jms.ObjectMessage}
357+
* carrying a {@link RemoteInvocationResult} object. If an invalid response
358+
* message is encountered, the {@code onInvalidResponse} callback gets invoked.
359359
* @param responseMessage the response message
360360
* @return the invocation result
361361
* @throws JMSException is thrown if a JMS exception occurs
@@ -370,10 +370,10 @@ protected RemoteInvocationResult extractInvocationResult(Message responseMessage
370370
}
371371

372372
/**
373-
* Callback that is invoked by {@code executeRequest} when the receive
374-
* timeout has expired for the specified {@link RemoteInvocation}
373+
* Callback that is invoked by {@link #executeRequest} when the receive
374+
* timeout has expired for the specified {@link RemoteInvocation}.
375375
* <p>By default, an {@link RemoteTimeoutException} is thrown. Sub-classes
376-
* can choose to either throw a more dedicated exception or event return
376+
* can choose to either throw a more dedicated exception or even return
377377
* a default {@link RemoteInvocationResult} as a fallback.
378378
* @param invocation the invocation
379379
* @return a default result when the receive timeout has expired
@@ -383,24 +383,25 @@ protected RemoteInvocationResult onReceiveTimeout(RemoteInvocation invocation) {
383383
}
384384

385385
/**
386-
* Callback that is invoked by {@code extractInvocationResult}
387-
* when it encounters an invalid response message.
388-
* <p>The default implementation throws a MessageFormatException.
386+
* Callback that is invoked by {@link #extractInvocationResult} when
387+
* it encounters an invalid response message.
388+
* <p>The default implementation throws a {@link MessageFormatException}.
389389
* @param responseMessage the invalid response message
390-
* @return an alternative invocation result that should be
391-
* returned to the caller (if desired)
392-
* @throws JMSException if the invalid response should lead
393-
* to an infrastructure exception propagated to the caller
390+
* @return an alternative invocation result that should be returned to
391+
* the caller (if desired)
392+
* @throws JMSException if the invalid response should lead to an
393+
* infrastructure exception propagated to the caller
394394
* @see #extractInvocationResult
395395
*/
396396
protected RemoteInvocationResult onInvalidResponse(Message responseMessage) throws JMSException {
397397
throw new MessageFormatException("Invalid response message: " + responseMessage);
398398
}
399399

400400
/**
401-
* Recreate the invocation result contained in the given RemoteInvocationResult
402-
* object. The default implementation calls the default recreate method.
403-
* <p>Can be overridden in subclass to provide custom recreation, potentially
401+
* Recreate the invocation result contained in the given {@link RemoteInvocationResult}
402+
* object.
403+
* <p>The default implementation calls the default {@code recreate()} method.
404+
* <p>Can be overridden in subclasses to provide custom recreation, potentially
404405
* processing the returned result object.
405406
* @param result the RemoteInvocationResult to recreate
406407
* @return a return value if the invocation result is a successful return
@@ -413,7 +414,7 @@ protected Object recreateRemoteInvocationResult(RemoteInvocationResult result) t
413414

414415
/**
415416
* Convert the given JMS invoker access exception to an appropriate
416-
* Spring RemoteAccessException.
417+
* Spring {@link RemoteAccessException}.
417418
* @param ex the exception to convert
418419
* @return the RemoteAccessException to throw
419420
*/

0 commit comments

Comments
 (0)