View Javadoc

1   package org.codehaus.xfire.handler;
2   
3   import org.codehaus.xfire.MessageContext;
4   import org.codehaus.xfire.fault.XFireFault;
5   
6   /***
7    * By virtue of XFire being stream based, a service can not write its
8    * response until the very end of processing. So a service which needs
9    * to write response headers but do so first before writing the 
10   * SOAP Body.  The writeResponse method tells an Endpoint that it is
11   * now okay (i.e. there have been no Faults) to write the 
12   * response to the OutputStream (if there is an response to the 
13   * sender at all) or to another endpoint.
14   * <p>
15   * If a Service does not wishes to write its response immediately when
16   * reading the incoming stream, it may do so and not implement the
17   * <code>writeResponse</code> method. The service must then realize that
18   * the response Handler pipeline will not be able to outgoing stream.
19   *  
20   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
21   */
22  public interface EndpointHandler
23  	extends Handler
24  {
25      public void writeResponse(MessageContext context) throws XFireFault;
26  }