diff --git a/core/src/main/java/org/springframework/ws/server/MessageDispatcher.java b/core/src/main/java/org/springframework/ws/server/MessageDispatcher.java index b2f81579..5e17faa4 100644 --- a/core/src/main/java/org/springframework/ws/server/MessageDispatcher.java +++ b/core/src/main/java/org/springframework/ws/server/MessageDispatcher.java @@ -41,27 +41,20 @@ import org.springframework.ws.transport.WebServiceMessageReceiver; import org.springframework.ws.transport.support.DefaultStrategiesHelper; /** - * Central dispatcher for use within Spring-WS, dispatching Web service messages to - * registered endpoints. - * - *
This dispatcher is quite similar to Spring MVCs DispatcherServlet.
- * Just like its counterpart, this dispatcher is very flexible.
- *
- *
EndpointMapping implementation - whether standard,
- * or provided as part of an application - to control the routing of request messages
- * to endpoint objects. Endpoint mappings can be registered using the
- * endpointMappings property.EndpointAdapter; this allows one to use any endpoint
- * interface or form. Defaults to the MessageEndpointAdapter and
- * PayloadEndpointAdapter, for MessageEndpoint and
- * PayloadEndpoint, respectively. Additional endpoint adapters can be
- * added through the endpointAdapters property.EndpointExceptionResolver, for example mapping certain exceptions to
- * SOAP Faults. Default is none. Additional exception resolvers can be added through
- * the endpointExceptionResolvers property.This dispatcher is quite similar to Spring MVCs DispatcherServlet. Just like its counterpart, this
+ * dispatcher is very flexible.
+ *
EndpointMapping implementation - whether standard, or provided as part of an
+ * application - to control the routing of request messages to endpoint objects. Endpoint mappings can be registered
+ * using the endpointMappings property.EndpointAdapter; this allows
+ * one to use any endpoint interface or form. Defaults to the MessageEndpointAdapter and
+ * PayloadEndpointAdapter, for MessageEndpoint and PayloadEndpoint, respectively.
+ * Additional endpoint adapters can be added through the endpointAdapters property.EndpointExceptionResolver, for example mapping certain
+ * exceptions to SOAP Faults. Default is none. Additional exception resolvers can be added through the
+ * endpointExceptionResolvers property.MessageDispatcher. */
@@ -130,7 +124,7 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
this.endpointMappings = endpointMappings;
}
- public void setBeanName(String beanName) {
+ public final void setBeanName(String beanName) {
this.beanName = beanName;
}
diff --git a/core/src/main/java/org/springframework/ws/server/endpoint/MethodEndpoint.java b/core/src/main/java/org/springframework/ws/server/endpoint/MethodEndpoint.java
index 99d138a7..bfc02659 100644
--- a/core/src/main/java/org/springframework/ws/server/endpoint/MethodEndpoint.java
+++ b/core/src/main/java/org/springframework/ws/server/endpoint/MethodEndpoint.java
@@ -54,22 +54,23 @@ public final class MethodEndpoint {
* @param bean the object bean
* @param methodName the method name
* @param parameterTypes the method parameter types
+ * @throws NoSuchMethodException when the method cannot be found
*/
public MethodEndpoint(Object bean, String methodName, Class[] parameterTypes) throws NoSuchMethodException {
Assert.notNull(bean, "bean must not be null");
Assert.notNull(methodName, "method must not be null");
this.bean = bean;
- method = bean.getClass().getMethod(methodName, parameterTypes);
+ this.method = bean.getClass().getMethod(methodName, parameterTypes);
}
/** Returns the object bean for this method endpoint. */
public Object getBean() {
- return bean;
+ return this.bean;
}
/** Returns the method for this method endpoint. */
public Method getMethod() {
- return method;
+ return this.method;
}
/**
@@ -81,7 +82,7 @@ public final class MethodEndpoint {
* @throws InvocationTargetException when the method invocation results in an exception
*/
public Object invoke(Object[] args) throws IllegalAccessException, InvocationTargetException {
- return ReflectionUtils.invokeMethod(method, bean, args);
+ return ReflectionUtils.invokeMethod(this.method, this.bean, args);
}
public boolean equals(Object o) {
@@ -90,16 +91,16 @@ public final class MethodEndpoint {
}
if (o != null && o instanceof MethodEndpoint) {
MethodEndpoint other = (MethodEndpoint) o;
- return bean.equals(other.bean) && method.equals(other.method);
+ return this.bean.equals(other.bean) && this.method.equals(other.method);
}
return false;
}
public int hashCode() {
- return 31 * bean.hashCode() + method.hashCode();
+ return 31 * this.bean.hashCode() + this.method.hashCode();
}
public String toString() {
- return method.toString();
+ return this.method.toString();
}
}