1 package org.codehaus.xfire; 2 3 import java.io.InputStream; 4 import java.io.OutputStream; 5 6 import javax.xml.stream.XMLStreamReader; 7 8 import org.codehaus.xfire.service.ServiceRegistry; 9 import org.codehaus.xfire.transport.TransportManager; 10 11 /*** 12 * <p>Central processing point for XFire. This can be instantiated 13 * programmatically by using one of the implementations (such as 14 * <code>DefaultXFire</code> or can be managed by a container like 15 * Pico or Plexus. 16 * </p> 17 * <p> 18 * Central, however, does not mean that there can be only one. 19 * Implementations can be very lightweight, creating fast generic 20 * SOAP processors. 21 * </p> 22 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> 23 * @since Feb 18, 2004 24 */ 25 public interface XFire 26 { 27 final public static String ROLE = XFire.class.getName(); 28 29 /*** 30 * Processes a new SOAP Message request. If a fault 31 * or exception occurs, it is written to the OutputStream 32 * in the <code>MessageContext</code>. However, 33 * <code>XFireRuntimeException</code>s may still be thrown if 34 * something fatal goes wrong in the pipeline. 35 * 36 * @param in An InputStream to the SOAP document. 37 * @param context The MessageContext. 38 */ 39 void invoke( InputStream in, 40 MessageContext context ); 41 42 /*** 43 * Processes a new SOAP Message request. If a fault 44 * or exception occurs, it is written to the OutputStream 45 * in the <code>MessageContext</code>. However, 46 * <code>XFireRuntimeException</code>s may still be thrown if 47 * something fatal goes wrong in the pipeline. 48 * 49 * @param in An InputStream to the SOAP document. 50 * @param context The MessageContext. 51 */ 52 void invoke( XMLStreamReader reader, 53 MessageContext context ); 54 55 /*** 56 * Generate WSDL for a service. 57 * 58 * @param service The name of the service. 59 * @param out The OutputStream to write the WSDL to. 60 */ 61 void generateWSDL(String service, OutputStream out); 62 63 /*** 64 * Get the <code>ServiceRegistry</code>. 65 */ 66 ServiceRegistry getServiceRegistry(); 67 68 /*** 69 * Get the <code>TransportManager</code>. 70 */ 71 TransportManager getTransportManager(); 72 }