|
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 org.springframework.ws.transport.AbstractSenderConnection org.springframework.ws.transport.jms.JmsSenderConnection
public class JmsSenderConnection
Implementation of WebServiceConnection
that is used for client-side JMS access. Exposes a BytesMessage
request and response message.
Constructor Summary | |
---|---|
protected |
JmsSenderConnection(ConnectionFactory connectionFactory,
Connection connection,
Session session,
Destination requestDestination,
Message requestMessage)
Constructs a new JMS connection with the given parameters. |
Method Summary | |
---|---|
protected void |
addRequestHeader(String name,
String value)
Adds a request header with the given name and value. |
String |
getErrorMessage()
Returns the error message. |
Message |
getRequestMessage()
Returns the request message for this connection. |
protected OutputStream |
getRequestOutputStream()
Returns the output stream to write the request to. |
protected Iterator |
getResponseHeaderNames()
Returns an iteration over all the header names this request contains. |
protected Iterator |
getResponseHeaders(String name)
Returns an iteration over all the string values of the specified header. |
protected InputStream |
getResponseInputStream()
Returns the input stream to read the response from. |
Message |
getResponseMessage()
Returns the response message, if any, for this connection. |
URI |
getUri()
Returns the URI for this connection. |
boolean |
hasError()
Indicates whether this connection has an error. |
protected boolean |
hasResponse()
Indicates whether this connection has a response. |
protected void |
onClose()
Template method invoked from AbstractWebServiceConnection.close() . |
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 . |
Methods inherited from class org.springframework.ws.transport.AbstractSenderConnection |
---|
createTransportInputStream, createTransportOutputStream |
Methods inherited from class org.springframework.ws.transport.AbstractWebServiceConnection |
---|
close, onReceiveAfterRead, onSendBeforeWrite, receive, send |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected JmsSenderConnection(ConnectionFactory connectionFactory, Connection connection, Session session, Destination requestDestination, Message requestMessage) throws JMSException
JMSException
Method Detail |
---|
public Message getRequestMessage()
BytesMessage
or a TextMessage
.
public Message getResponseMessage()
BytesMessage
or a TextMessage
.
public URI getUri() throws URISyntaxException
WebServiceConnection
URISyntaxException
public boolean hasError() throws IOException
WebServiceConnection
true
if this connection has an error; false
otherwise.
IOException
public String getErrorMessage() throws IOException
WebServiceConnection
null
when no error is present
IOException
WebServiceConnection.hasError()
protected void addRequestHeader(String name, String value) throws IOException
AbstractSenderConnection
addRequestHeader
in class AbstractSenderConnection
name
- the name of the headervalue
- the value of the header
IOException
protected OutputStream getRequestOutputStream() throws IOException
AbstractSenderConnection
getRequestOutputStream
in class AbstractSenderConnection
IOException
protected void onSendAfterWrite(WebServiceMessage message) throws IOException
AbstractWebServiceConnection
TransportOutputStream
. Called from AbstractWebServiceConnection.send(WebServiceMessage)
.
Default implementation does nothing.
onSendAfterWrite
in class AbstractWebServiceConnection
message
- the message
IOException
- when an I/O exception occursprotected void onReceiveBeforeRead() throws IOException
AbstractWebServiceConnection
TransportInputStream
. Called from AbstractWebServiceConnection.receive(WebServiceMessageFactory)
.
Default implementation does nothing.
onReceiveBeforeRead
in class AbstractWebServiceConnection
IOException
- when an I/O exception occursprotected boolean hasResponse() throws IOException
AbstractSenderConnection
hasResponse
in class AbstractSenderConnection
IOException
protected Iterator getResponseHeaderNames() throws IOException
AbstractSenderConnection
Iterator
if
there areno headers.
getResponseHeaderNames
in class AbstractSenderConnection
IOException
protected Iterator getResponseHeaders(String name) throws IOException
AbstractSenderConnection
Iterator
if there are no headers of the specified name.
getResponseHeaders
in class AbstractSenderConnection
IOException
protected InputStream getResponseInputStream() throws IOException
AbstractSenderConnection
getResponseInputStream
in class AbstractSenderConnection
IOException
protected void onClose() throws IOException
AbstractSenderConnection
AbstractWebServiceConnection.close()
. Default implementation is empty.
onClose
in class AbstractSenderConnection
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 |