Checkstyle.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
* <p>This dispatcher is quite similar to Spring MVCs <code>DispatcherServlet</code>.
|
||||
* Just like its counterpart, this dispatcher is very flexible.
|
||||
*
|
||||
* <ul>
|
||||
* <li>It can use any <code>EndpointMapping</code> 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
|
||||
* <code>endpointMappings</code> property.</li>
|
||||
* <li>It can use any <code>EndpointAdapter</code>; this allows one to use any endpoint
|
||||
* interface or form. Defaults to the <code>MessageEndpointAdapter</code> and
|
||||
* <code>PayloadEndpointAdapter</code>, for <code>MessageEndpoint</code> and
|
||||
* <code>PayloadEndpoint</code>, respectively. Additional endpoint adapters can be
|
||||
* added through the <code>endpointAdapters</code> property.</li>
|
||||
* <li>Its exception resolution strategy can be specified via a
|
||||
* <code>EndpointExceptionResolver</code>, for example mapping certain exceptions to
|
||||
* SOAP Faults. Default is none. Additional exception resolvers can be added through
|
||||
* the <code>endpointExceptionResolvers</code> property.</li>
|
||||
* </ul>
|
||||
* Central dispatcher for use within Spring-WS, dispatching Web service messages to registered endpoints.
|
||||
* <p/>
|
||||
* <p>This dispatcher is quite similar to Spring MVCs <code>DispatcherServlet</code>. Just like its counterpart, this
|
||||
* dispatcher is very flexible.
|
||||
* <p/>
|
||||
* <ul> <li>It can use any <code>EndpointMapping</code> 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 <code>endpointMappings</code> property.</li> <li>It can use any <code>EndpointAdapter</code>; this allows
|
||||
* one to use any endpoint interface or form. Defaults to the <code>MessageEndpointAdapter</code> and
|
||||
* <code>PayloadEndpointAdapter</code>, for <code>MessageEndpoint</code> and <code>PayloadEndpoint</code>, respectively.
|
||||
* Additional endpoint adapters can be added through the <code>endpointAdapters</code> property.</li> <li>Its exception
|
||||
* resolution strategy can be specified via a <code>EndpointExceptionResolver</code>, for example mapping certain
|
||||
* exceptions to SOAP Faults. Default is none. Additional exception resolvers can be added through the
|
||||
* <code>endpointExceptionResolvers</code> property.</li> </ul>
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see EndpointMapping
|
||||
@@ -75,7 +68,8 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
public static final String ENDPOINT_NOT_FOUND_LOG_CATEGORY = "org.springframework.ws.EndpointNotFound";
|
||||
|
||||
/** Additional logger to use when no mapped endpoint is found for a request. */
|
||||
protected static final Log endpointNotFoundLogger = LogFactory.getLog(ENDPOINT_NOT_FOUND_LOG_CATEGORY);
|
||||
protected static final Log endpointNotFoundLogger =
|
||||
LogFactory.getLog(MessageDispatcher.ENDPOINT_NOT_FOUND_LOG_CATEGORY);
|
||||
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
@@ -85,13 +79,13 @@ public class MessageDispatcher implements WebServiceMessageReceiver, BeanNameAwa
|
||||
/** The registered bean name for this dispatcher. */
|
||||
private String beanName;
|
||||
|
||||
/** List of EndpointAdapters used in this dispatcher */
|
||||
/** List of EndpointAdapters used in this dispatcher. */
|
||||
private List endpointAdapters;
|
||||
|
||||
/** List of EndpointExceptionResolvers used in this dispatcher */
|
||||
/** List of EndpointExceptionResolvers used in this dispatcher. */
|
||||
private List endpointExceptionResolvers;
|
||||
|
||||
/** List of EndpointMappings used in this dispatcher */
|
||||
/** List of EndpointMappings used in this dispatcher. */
|
||||
private List endpointMappings;
|
||||
|
||||
/** Initializes a new instance of the <code>MessageDispatcher</code>. */
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user