|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.support.ApplicationObjectSupport org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping org.springframework.ws.server.endpoint.mapping.AbstractMapBasedEndpointMapping
public abstract class AbstractMapBasedEndpointMapping
Abstract base class for endpoint mapping that are based on a Map
. Provides mappings of application
context beans as well as a settable map.
Field Summary |
---|
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
AbstractMapBasedEndpointMapping()
|
Method Summary | |
---|---|
protected Object |
getEndpointInternal(MessageContext messageContext)
Lookup an endpoint for the given message. |
protected abstract String |
getLookupKeyForMessage(MessageContext messageContext)
Returns the the endpoint key for the given message context. |
protected void |
initApplicationContext()
Registers annd checks the set endpoints. |
protected Object |
lookupEndpoint(String key)
Looks up an endpoint instance for the given keys. |
protected void |
registerEndpoint(String key,
Object endpoint)
Register the given endpoint instance under the registration key. |
void |
setEndpointMap(Map endpointMap)
Sets a Map with keys and endpoint beans as values. |
void |
setLazyInitEndpoints(boolean lazyInitEndpoints)
Set whether to lazily initialize endpoints. |
void |
setMappings(Properties mappings)
Maps keys to endpoint bean names. |
void |
setRegisterBeanNames(boolean registerBeanNames)
Set whether to register bean names found in the application context. |
protected abstract boolean |
validateLookupKey(String key)
Validates the given endpoint key. |
Methods inherited from class org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping |
---|
createEndpointInvocationChain, getDefaultEndpoint, getEndpoint, getInterceptors, getOrder, resolveStringEndpoint, setDefaultEndpoint, setInterceptors, setOrder |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, isContextRequired, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMapBasedEndpointMapping()
Method Detail |
---|
public void setLazyInitEndpoints(boolean lazyInitEndpoints)
false
, as eager initialization allows for more efficiency through
referencing the controller objects directly.
If you want to allow your endpoints to be lazily initialized, make them "lazy-init" and set this flag to
true
. Just making them "lazy-init" will not work, as they are initialized through the references
from the endpoint mapping in this case.
public final void setRegisterBeanNames(boolean registerBeanNames)
true
will
register all beans found in the application context under their name. Default is false
.
public final void setEndpointMap(Map endpointMap)
IllegalArgumentException
- if the endpoint is invalidpublic void setMappings(Properties mappings)
protected abstract boolean validateLookupKey(String key)
true
is the given string is valid.
protected abstract String getLookupKeyForMessage(MessageContext messageContext) throws Exception
null
if a key cannot be found.
null
Exception
protected final Object getEndpointInternal(MessageContext messageContext) throws Exception
getEndpointInternal
in class AbstractEndpointMapping
null
Exception
- if there is an errorprotected Object lookupEndpoint(String key)
key
- key the beans are mapped to
null
if not foundprotected void registerEndpoint(String key, Object endpoint) throws BeansException
key
- the string representation of the registration keyendpoint
- the endpoint instance
BeansException
- if the endpoint could not be registeredprotected final void initApplicationContext() throws BeansException
setEndpointMap
and
setMappings
, and registers the bean names found in the application context, if
registerBeanNames
is set to true
.
initApplicationContext
in class ApplicationObjectSupport
ApplicationContextException
- if either of the endpoints defined via setEndpointMap
or
setMappings
is invalid
BeansException
setEndpointMap(java.util.Map)
,
setMappings(java.util.Properties)
,
setRegisterBeanNames(boolean)
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |