Spring Web Services Framework

org.springframework.ws.server.endpoint
Class AbstractStaxStreamPayloadEndpoint

java.lang.Object
  extended by org.springframework.xml.transform.TransformerObjectSupport
      extended by org.springframework.ws.server.endpoint.AbstractStaxPayloadEndpoint
          extended by org.springframework.ws.server.endpoint.AbstractStaxStreamPayloadEndpoint
All Implemented Interfaces:
MessageEndpoint

public abstract class AbstractStaxStreamPayloadEndpoint
extends AbstractStaxPayloadEndpoint
implements MessageEndpoint

Abstract base class for endpoints that handle the message payload with streaming StAX. Allows subclasses to read the request with a XMLStreamReader, and to create a response using a XMLStreamWriter.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
invokeInternal(javax.xml.stream.XMLStreamReader,javax.xml.stream.XMLStreamWriter), XMLStreamReader, XMLStreamWriter

Field Summary
 
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
 
Constructor Summary
AbstractStaxStreamPayloadEndpoint()
           
 
Method Summary
 void invoke(MessageContext messageContext)
          Invokes an operation.
protected abstract  void invokeInternal(XMLStreamReader streamReader, XMLStreamWriter streamWriter)
          Template method.
 
Methods inherited from class org.springframework.ws.server.endpoint.AbstractStaxPayloadEndpoint
createXmlInputFactory, createXmlOutputFactory, getInputFactory, getOutputFactory
 
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStaxStreamPayloadEndpoint

public AbstractStaxStreamPayloadEndpoint()
Method Detail

invoke

public final void invoke(MessageContext messageContext)
                  throws Exception
Description copied from interface: MessageEndpoint
Invokes an operation.

The given messageContext can be used to create a response.

Specified by:
invoke in interface MessageEndpoint
Parameters:
messageContext - the message context
Throws:
Exception - if an exception occurs

invokeInternal

protected abstract void invokeInternal(XMLStreamReader streamReader,
                                       XMLStreamWriter streamWriter)
                                throws Exception
Template method. Subclasses must implement this. Offers the request payload as a XMLStreamReader, and a XMLStreamWriter to write the response payload to.

Parameters:
streamReader - the reader to read the payload from
streamWriter - the writer to write the payload to
Throws:
Exception

Spring Web Services Framework

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