Package org.springframework.ws.context
Class DefaultMessageContext
java.lang.Object
org.springframework.ws.context.AbstractMessageContext
org.springframework.ws.context.DefaultMessageContext
- All Implemented Interfaces:
MessageContext
Default implementation of
MessageContext.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultMessageContext(WebServiceMessageFactory messageFactory) Construct a new, empty instance of theDefaultMessageContextwith the given message factory.DefaultMessageContext(WebServiceMessage request, WebServiceMessageFactory messageFactory) Construct a new instance of theDefaultMessageContextwith the given request message and message factory. -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves the response message, if any.Returns the request message.Returns the response message.booleanIndicates whether this context has a response.voidreadResponse(InputStream inputStream) Reads a response message from the given input stream.voidsetResponse(WebServiceMessage response) Sets the response message.Methods inherited from class org.springframework.ws.context.AbstractMessageContext
containsProperty, getProperty, getPropertyNames, removeProperty, setProperty
-
Constructor Details
-
DefaultMessageContext
Construct a new, empty instance of theDefaultMessageContextwith the given message factory. -
DefaultMessageContext
Construct a new instance of theDefaultMessageContextwith the given request message and message factory.
-
-
Method Details
-
getRequest
Description copied from interface:MessageContextReturns the request message.- Returns:
- the request message
-
hasResponse
public boolean hasResponse()Description copied from interface:MessageContextIndicates whether this context has a response.- Returns:
trueif this context has a response;falseotherwise
-
getResponse
Description copied from interface:MessageContextReturns the response message. Creates a new response if no response is present.- Returns:
- the response message
- See Also:
-
setResponse
Description copied from interface:MessageContextSets the response message.- Parameters:
response- the response message
-
clearResponse
public void clearResponse()Description copied from interface:MessageContextRemoves the response message, if any. -
readResponse
Description copied from interface:MessageContextReads a response message from the given input stream.- Parameters:
inputStream- the stream to read the response from- Throws:
IOException- in case of I/O errors
-
getMessageFactory
-