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
 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.
 
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

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()

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

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

Spring Web Services Framework

Copyright � 2005-2008 The Spring Web Services Framework. All Rights Reserved.