public class JmsReceiverConnection extends AbstractReceiverConnection
WebServiceConnection that is used for server-side JMS access. Exposes a
BytesMessage or TextMessage request and response message.
The response message type is equal to the request message type, i.e. if a BytesMessage is received as
request, a BytesMessage is created as response, and if a TextMessage is received, a
TextMessage response is created.
| Modifier | Constructor and Description |
|---|---|
protected |
JmsReceiverConnection(javax.jms.BytesMessage requestMessage,
javax.jms.Session session)
Constructs a new JMS connection with the given
BytesMessage. |
protected |
JmsReceiverConnection(javax.jms.TextMessage requestMessage,
String encoding,
javax.jms.Session session)
Constructs a new JMS connection with the given
TextMessage. |
| Modifier and Type | Method and Description |
|---|---|
void |
addResponseHeader(String name,
String value) |
String |
getErrorMessage() |
Iterator<String> |
getRequestHeaderNames() |
Iterator<String> |
getRequestHeaders(String name) |
protected InputStream |
getRequestInputStream() |
javax.jms.Message |
getRequestMessage()
Returns the request message for this connection.
|
javax.jms.Message |
getResponseMessage()
Returns the response message, if any, for this connection.
|
protected OutputStream |
getResponseOutputStream() |
URI |
getUri() |
boolean |
hasError() |
protected void |
onSendAfterWrite(WebServiceMessage message) |
protected void |
onSendBeforeWrite(WebServiceMessage message) |
createTransportInputStream, createTransportOutputStream, onCloseclose, onReceiveAfterRead, onReceiveBeforeRead, receive, sendprotected JmsReceiverConnection(javax.jms.BytesMessage requestMessage,
javax.jms.Session session)
BytesMessage.requestMessage - the JMS request messagesession - the JMS sessionprotected JmsReceiverConnection(javax.jms.TextMessage requestMessage,
String encoding,
javax.jms.Session session)
TextMessage.requestMessage - the JMS request messagesession - the JMS sessionpublic javax.jms.Message getRequestMessage()
BytesMessage or a TextMessage.public javax.jms.Message getResponseMessage()
BytesMessage or a
TextMessage.public URI getUri() throws URISyntaxException
URISyntaxExceptionpublic String getErrorMessage() throws IOException
IOExceptionpublic boolean hasError()
throws IOException
IOExceptionpublic Iterator<String> getRequestHeaderNames() throws IOException
IOExceptionpublic Iterator<String> getRequestHeaders(String name) throws IOException
IOExceptionprotected InputStream getRequestInputStream() throws IOException
getRequestInputStream in class AbstractReceiverConnectionIOExceptionprotected void onSendBeforeWrite(WebServiceMessage message) throws IOException
onSendBeforeWrite in class AbstractWebServiceConnectionIOExceptionpublic void addResponseHeader(String name, String value) throws IOException
IOExceptionprotected OutputStream getResponseOutputStream() throws IOException
getResponseOutputStream in class AbstractReceiverConnectionIOExceptionprotected void onSendAfterWrite(WebServiceMessage message) throws IOException
onSendAfterWrite in class AbstractWebServiceConnectionIOExceptionCopyright © 2022 Pivotal Software. All rights reserved.