1 package org.codehaus.xfire.service;
2
3 import java.net.URL;
4 import java.util.Map;
5
6 /***
7 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
8 */
9 public interface ServiceFactory
10 {
11 /***
12 * Create a service from the specified class.
13 *
14 * @param clazz The service class used to populate the operations and parameters.
15 * @return The service.
16 */
17 public Service create(Class clazz);
18
19 /***
20 * Create a service from the specified class.
21 *
22 * @param clazz The service class used to populate the operations and parameters.
23 * @param properties Properties to set on the service and use in construction.
24 * @return The service.
25 */
26 public Service create(Class clazz, Map properties);
27
28 /***
29 * Create a service from the specified class.
30 *
31 * @param clazz
32 * The service class used to populate the operations and
33 * parameters.
34 * @param name
35 * The name of the service.
36 * @param namespace
37 * The default namespace of the service.
38 * @param properties
39 * Service specific properties which the ServiceFactory will use
40 * to create the service.
41 * @return The service.
42 */
43 public Service create(Class clazz,
44 String name,
45 String namespace,
46 Map properties);
47
48 /***
49 * Create a service from a WSDL file. NOTE: This probably doesn't work yet.
50 *
51 * @param clazz The service class for the wsdl.
52 * @param wsdlUrl The WSDL URL.
53 * @return
54 * @throws Exception
55 */
56 public Service create(Class clazz, URL wsdlUrl)
57 throws Exception;
58 }