|
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.ws.transport.AbstractWebServiceConnection
public abstract class AbstractWebServiceConnection
Abstract base class for WebServiceConnection
implementations.
Constructor Summary | |
---|---|
AbstractWebServiceConnection()
|
Method Summary | |
---|---|
void |
close()
Closes this connection. |
protected abstract TransportInputStream |
createTransportInputStream()
Returns a TransportInputStream . |
protected abstract TransportOutputStream |
createTransportOutputStream()
Returns a TransportOutputStream for the given message. |
protected void |
onClose()
Template method invoked from close() . |
protected void |
onReceiveAfterRead(WebServiceMessage message)
Called when the given message has been read from the TransportInputStream . |
protected void |
onReceiveBeforeRead()
Called before a message has been read from the TransportInputStream . |
protected void |
onSendAfterWrite(WebServiceMessage message)
Called after the given message has been written to the TransportOutputStream . |
protected void |
onSendBeforeWrite(WebServiceMessage message)
Called before the given message has been written to the TransportOutputStream . |
WebServiceMessage |
receive(WebServiceMessageFactory messageFactory)
Receives a message using the given WebServiceMessageFactory . |
void |
send(WebServiceMessage message)
Sends the given message using this connection. |
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.WebServiceConnection |
---|
getErrorMessage, getUri, hasError |
Constructor Detail |
---|
public AbstractWebServiceConnection()
Method Detail |
---|
public final void send(WebServiceMessage message) throws IOException
WebServiceConnection
send
in interface WebServiceConnection
message
- the message to be sent
IOException
- in case of I/O errorsprotected void onSendBeforeWrite(WebServiceMessage message) throws IOException
TransportOutputStream
. Called from send(WebServiceMessage)
.
Default implementation does nothing.
message
- the message
IOException
- when an I/O exception occursprotected abstract TransportOutputStream createTransportOutputStream() throws IOException
TransportOutputStream
for the given message. Called from send(WebServiceMessage)
.
IOException
- when an I/O exception occursprotected void onSendAfterWrite(WebServiceMessage message) throws IOException
TransportOutputStream
. Called from send(WebServiceMessage)
.
Default implementation does nothing.
message
- the message
IOException
- when an I/O exception occurspublic final WebServiceMessage receive(WebServiceMessageFactory messageFactory) throws IOException
WebServiceConnection
WebServiceMessageFactory
. This method blocks until it receives, or
returns null
when no message is received.
receive
in interface WebServiceConnection
messageFactory
- the message factory used for reading messages
null
if no message received
IOException
- in case of I/O errorsprotected void onReceiveBeforeRead() throws IOException
TransportInputStream
. Called from receive(WebServiceMessageFactory)
.
Default implementation does nothing.
IOException
- when an I/O exception occursprotected abstract TransportInputStream createTransportInputStream() throws IOException
TransportInputStream
. Called from receive(WebServiceMessageFactory)
.
null
if no response can be read
IOException
- when an I/O exception occursprotected void onReceiveAfterRead(WebServiceMessage message) throws IOException
TransportInputStream
. Called from receive(WebServiceMessageFactory)
.
Default implementation does nothing.
message
- the message
IOException
- when an I/O exception occurspublic final void close() throws IOException
WebServiceConnection
close
in interface WebServiceConnection
IOException
- if an I/O error occurs when closing this connectionprotected void onClose() throws IOException
close()
. Default implementation is empty.
IOException
- if an I/O error occurs when closing this connection
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |