Package org.springframework.ws.transport
Class AbstractSenderConnection
java.lang.Object
org.springframework.ws.transport.AbstractWebServiceConnection
org.springframework.ws.transport.AbstractSenderConnection
- All Implemented Interfaces:
AutoCloseable
,HeadersAwareSenderWebServiceConnection
,WebServiceConnection
- Direct Known Subclasses:
AbstractHttpSenderConnection
,JmsSenderConnection
,MailSenderConnection
,XmppSenderConnection
public abstract class AbstractSenderConnection
extends AbstractWebServiceConnection
implements HeadersAwareSenderWebServiceConnection
Abstract base class for
WebServiceConnection
implementations used for sending requests.- Since:
- 1.0.0
- Author:
- Arjen Poutsma, Greg Turnquist
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final TransportInputStream
Returns aTransportInputStream
.protected final TransportOutputStream
Returns aTransportOutputStream
for the given message.protected abstract OutputStream
Returns the output stream to write the request to.protected abstract InputStream
Returns the input stream to read the response from.protected abstract boolean
Indicates whether this connection has a response.protected void
onClose()
Template method invoked fromAbstractWebServiceConnection.close()
.Methods inherited from class org.springframework.ws.transport.AbstractWebServiceConnection
close, onReceiveAfterRead, onReceiveBeforeRead, onSendAfterWrite, onSendBeforeWrite, receive, send
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.ws.transport.HeadersAwareSenderWebServiceConnection
addRequestHeader, getResponseHeaderNames, getResponseHeaders
Methods inherited from interface org.springframework.ws.transport.WebServiceConnection
getErrorMessage, getUri, hasError
-
Constructor Details
-
AbstractSenderConnection
public AbstractSenderConnection()
-
-
Method Details
-
createTransportOutputStream
Description copied from class:AbstractWebServiceConnection
Returns aTransportOutputStream
for the given message. Called fromAbstractWebServiceConnection.send(WebServiceMessage)
.- Specified by:
createTransportOutputStream
in classAbstractWebServiceConnection
- Returns:
- the output stream
- Throws:
IOException
- when an I/O exception occurs
-
createTransportInputStream
Description copied from class:AbstractWebServiceConnection
Returns aTransportInputStream
. Called fromAbstractWebServiceConnection.receive(WebServiceMessageFactory)
.- Specified by:
createTransportInputStream
in classAbstractWebServiceConnection
- Returns:
- the input stream, or
null
if no response can be read - Throws:
IOException
- when an I/O exception occurs
-
onClose
Template method invoked fromAbstractWebServiceConnection.close()
. Default implementation is empty.- Overrides:
onClose
in classAbstractWebServiceConnection
- Throws:
IOException
- if an I/O error occurs when closing this connection
-
hasResponse
Indicates whether this connection has a response.- Throws:
IOException
-
getRequestOutputStream
Returns the output stream to write the request to.- Throws:
IOException
-
getResponseInputStream
Returns the input stream to read the response from.- Throws:
IOException
-