Class SimpleMethodEndpointMapping
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping
org.springframework.ws.server.endpoint.mapping.AbstractMethodEndpointMapping<String>
org.springframework.ws.server.endpoint.mapping.SimpleMethodEndpointMapping
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.core.Ordered,EndpointMapping
public class SimpleMethodEndpointMapping
extends AbstractMethodEndpointMapping<String>
implements org.springframework.beans.factory.InitializingBean
Simple subclass of
AbstractMethodEndpointMapping that maps from the local name of the request payload to
methods. Endpoint beans are registered using the endpoints property; the endpoint methods that start with
methodPrefix and end with methodSuffix will be registered.
Endpoints typically have the following form:
public class MyEndpoint{
public Source handleMyMessage(Source source) {
...
}
}
This method will handle any message that has the MyMessage as a payload root local name.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault method prefix.static final StringDefault method suffix.Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidObject[]protected StringgetLookupKeyForMessage(MessageContext messageContext) Returns the local part of the payload root element of the request.protected StringgetLookupKeyForMethod(Method method) Returns the name of the given method, with the prefix and suffix stripped off.Returns the method prefix.Returns the method suffix.voidsetEndpoints(Object[] endpoints) Sets the endpoints.voidsetMethodPrefix(String methodPrefix) Sets the method prefix.voidsetMethodSuffix(String methodSuffix) Sets the method suffix.Methods inherited from class org.springframework.ws.server.endpoint.mapping.AbstractMethodEndpointMapping
getEndpointClass, getEndpointInternal, getLookupKeysForMethod, lookupEndpoint, registerEndpoint, registerMethods, registerMethodsMethods inherited from class org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping
createEndpointInvocationChain, getDefaultEndpoint, getEndpoint, getInterceptors, getOrder, initApplicationContext, initInterceptors, resolveStringEndpoint, setDefaultEndpoint, setInterceptors, setOrderMethods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContext
-
Field Details
-
DEFAULT_METHOD_PREFIX
Default method prefix.- See Also:
-
DEFAULT_METHOD_SUFFIX
Default method suffix.- See Also:
-
-
Constructor Details
-
SimpleMethodEndpointMapping
public SimpleMethodEndpointMapping()
-
-
Method Details
-
getEndpoints
-
setEndpoints
Sets the endpoints. The endpoint methods that start withmethodPrefixand end withmethodSuffixwill be registered. -
getMethodPrefix
Returns the method prefix. -
setMethodPrefix
Sets the method prefix. All methods with names starting with this string will be registered. Default is "handle".- See Also:
-
getMethodSuffix
Returns the method suffix. -
setMethodSuffix
Sets the method suffix. All methods with names ending with this string will be registered. Default is "" (i.e. no suffix).- See Also:
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getLookupKeyForMethod
Returns the name of the given method, with the prefix and suffix stripped off.- Overrides:
getLookupKeyForMethodin classAbstractMethodEndpointMapping<String>- Parameters:
method- the method- Returns:
- a registration key, or
nullif the method is not to be registered - See Also:
-
getLookupKeyForMessage
Returns the local part of the payload root element of the request.- Specified by:
getLookupKeyForMessagein classAbstractMethodEndpointMapping<String>- Returns:
- the registration keys
- Throws:
TransformerException
-