Spring Web Services Framework

org.springframework.ws.context
Class DefaultMessageContext

java.lang.Object
  extended by org.springframework.ws.context.AbstractMessageContext
      extended by org.springframework.ws.context.DefaultMessageContext
All Implemented Interfaces:
MessageContext

public class DefaultMessageContext
extends AbstractMessageContext

Default implementation of MessageContext.

Since:
1.0.0
Author:
Arjen Poutsma

Constructor Summary
DefaultMessageContext(WebServiceMessageFactory messageFactory)
          Construct a new, empty instance of the DefaultMessageContext with the given message factory.
DefaultMessageContext(WebServiceMessage request, WebServiceMessageFactory messageFactory)
          Construct a new instance of the DefaultMessageContext with the given request message and message factory.
 
Method Summary
 void clearResponse()
          Removes the response message, if any.
 WebServiceMessageFactory getMessageFactory()
           
 WebServiceMessage getRequest()
          Returns the request message.
 WebServiceMessage getResponse()
          Returns the response message.
 boolean hasResponse()
          Indicates whether this context has a response.
 void readResponse(InputStream inputStream)
          Reads a response message from the given input stream.
 void setResponse(WebServiceMessage response)
          Sets the response message.
 
Methods inherited from class org.springframework.ws.context.AbstractMessageContext
containsProperty, getProperty, getPropertyNames, removeProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessageContext

public DefaultMessageContext(WebServiceMessageFactory messageFactory)
Construct a new, empty instance of the DefaultMessageContext with the given message factory.


DefaultMessageContext

public DefaultMessageContext(WebServiceMessage request,
                             WebServiceMessageFactory messageFactory)
Construct a new instance of the DefaultMessageContext with the given request message and message factory.

Method Detail

getRequest

public WebServiceMessage getRequest()
Description copied from interface: MessageContext
Returns the request message.

Returns:
the request message

hasResponse

public boolean hasResponse()
Description copied from interface: MessageContext
Indicates whether this context has a response.

Returns:
true if this context has a response; false otherwise

getResponse

public WebServiceMessage getResponse()
Description copied from interface: MessageContext
Returns the response message. Creates a new response if no response is present.

Returns:
the response message
See Also:
MessageContext.hasResponse()

setResponse

public void setResponse(WebServiceMessage response)
Description copied from interface: MessageContext
Sets the response message.

Parameters:
response - the response message

clearResponse

public void clearResponse()
Description copied from interface: MessageContext
Removes the response message, if any.


readResponse

public void readResponse(InputStream inputStream)
                  throws IOException
Description copied from interface: MessageContext
Reads 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

public WebServiceMessageFactory getMessageFactory()

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.