Class AbstractWebServiceMessageSender<D extends WebServiceMessageSender.DestinationDescriptor>
java.lang.Object
org.springframework.ws.transport.AbstractWebServiceMessageSender<D>
- Type Parameters:
D- concreteWebServiceMessageSender.DestinationDescriptortype
- All Implemented Interfaces:
WebServiceMessageSender
- Direct Known Subclasses:
AbstractHttpWebServiceMessageSender, MailMessageSender, XmppMessageSender
public abstract class AbstractWebServiceMessageSender<D extends WebServiceMessageSender.DestinationDescriptor>
extends Object
implements WebServiceMessageSender
Base class for
WebServiceMessageSender implementations that share
WebServiceMessageSender.DestinationPolicy handling for supports(URI, UriSource).
A URI filter must be provided to only accept a URI that the implementation handles,
irrespective of whether it is acceptable according to an WebServiceMessageSender.UriSource.
Implementations typically inspect the URI scheme (or other transport-specific traits)
in that filter.
- Since:
- 3.1.9
-
Nested Class Summary
Nested classes/interfaces inherited from interface WebServiceMessageSender
WebServiceMessageSender.DestinationDescriptor, WebServiceMessageSender.DestinationPolicy<D>, WebServiceMessageSender.UriSource -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractWebServiceMessageSender(Predicate<URI> supportedUriFilter) Create an instance with the URI filter to apply to accept a given URI. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract DcreateDescriptor(URI uri, WebServiceMessageSender.UriSource uriSource) defaultChecks(WebServiceMessageSender.UriSource uriSource) Return the default checks to apply for the givenWebServiceMessageSender.UriSource.protected @Nullable WebServiceMessageSender.DestinationPolicy<D> Return the configuredWebServiceMessageSender.DestinationPolicyornullif none is set.voidsetDestinationPolicy(WebServiceMessageSender.DestinationPolicy<D> destinationPolicy) Set a customWebServiceMessageSender.DestinationPolicyto compose with the sender's default checks.booleansupports(URI uri, WebServiceMessageSender.UriSource uriSource) Whether this sender supports the given URI for the suppliedWebServiceMessageSender.UriSource.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WebServiceMessageSender
createConnection, supports
-
Constructor Details
-
AbstractWebServiceMessageSender
-
-
Method Details
-
setDestinationPolicy
Set a customWebServiceMessageSender.DestinationPolicyto compose with the sender's default checks. When unset, only default checks apply.- Parameters:
destinationPolicy- the policy to apply
-
getDestinationPolicy
Return the configuredWebServiceMessageSender.DestinationPolicyornullif none is set.- Returns:
- the custom destination policy or
nullif none is set.
-
supports
Description copied from interface:WebServiceMessageSenderWhether this sender supports the given URI for the suppliedWebServiceMessageSender.UriSource. Implementations typically apply the same transport rules forWebServiceMessageSender.UriSource.APPLICATIONas for legacyWebServiceMessageSender.supports(URI), and add stricter checks forWebServiceMessageSender.UriSource.REMOTE.- Specified by:
supportsin interfaceWebServiceMessageSender- Parameters:
uri- the URI to be checkeduriSource- whether the URI is application-controlled or remote-influenced- Returns:
trueif this sender accepts the URI for that source
-
createDescriptor
- Parameters:
uri- the URI to checkuriSource- the source of the URI- Returns:
- a suitable descriptor
-
defaultChecks
Return the default checks to apply for the givenWebServiceMessageSender.UriSource.- Returns:
- the default checks to apply
-