1 package org.codehaus.xfire.client; 2 3 import javax.xml.stream.XMLStreamException; 4 import javax.xml.stream.XMLStreamReader; 5 import javax.xml.stream.XMLStreamWriter; 6 7 /*** 8 * <p> 9 * A ClientHandler creates the necessary requestion and response objects 10 * from the XML streams. If this is a SOAP invocation, there will be a 11 * handler for the header and for the body. 12 * </p> 13 * 14 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> 15 * @since Oct 26, 2004 16 */ 17 public interface ClientHandler 18 { 19 /*** 20 * @return Whether or not there is a request to write. 21 */ 22 boolean hasRequest(); 23 24 /*** 25 * Write the request to the XMLStreamWriter. 26 * 27 * @param writer 28 * @throws XMLStreamException 29 */ 30 void writeRequest( XMLStreamWriter writer ) 31 throws XMLStreamException; 32 33 /*** 34 * Handle the response. 35 * @param reader 36 * @throws XMLStreamException 37 */ 38 void handleResponse( XMLStreamReader reader ) 39 throws XMLStreamException; 40 }