01: /*
02: * Portions Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04: *
05: * This code is free software; you can redistribute it and/or modify it
06: * under the terms of the GNU General Public License version 2 only, as
07: * published by the Free Software Foundation. Sun designates this
08: * particular file as subject to the "Classpath" exception as provided
09: * by Sun in the LICENSE file that accompanied this code.
10: *
11: * This code is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14: * version 2 for more details (a copy is included in the LICENSE file that
15: * accompanied this code).
16: *
17: * You should have received a copy of the GNU General Public License version
18: * 2 along with this work; if not, write to the Free Software Foundation,
19: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22: * CA 95054 USA or visit www.sun.com if you need additional information or
23: * have any questions.
24: */
25: package com.sun.tools.internal.ws.spi;
26:
27: import com.sun.tools.internal.ws.util.WSToolsObjectFactoryImpl;
28: import java.io.OutputStream;
29:
30: /**
31: * Singleton abstract factory used to produce JAX-WS tools related objects.
32: *
33: * @author JAX-WS Development Team
34: */
35: public abstract class WSToolsObjectFactory {
36:
37: private static WSToolsObjectFactory factory;
38:
39: /**
40: * Obtain an instance of a factory. Don't worry about synchronization(at the
41: * most, one more factory is created).
42: */
43: public static WSToolsObjectFactory newInstance() {
44: if (factory == null) {
45: factory = new WSToolsObjectFactoryImpl();
46: }
47: return factory;
48: }
49:
50: /**
51: * Invokes wsimport on the wsdl URL argument, and generates the necessary
52: * portable artifacts like SEI, Service, Bean classes etc.
53: *
54: * @return true if there is no error, otherwise false
55: */
56: public abstract boolean wsimport(OutputStream logStream,
57: String[] args);
58:
59: /**
60: * Invokes wsgen on the endpoint implementation, and generates the necessary
61: * artifacts like wrapper, exception bean classes etc.
62: *
63: * @return true if there is no error, otherwise false
64: */
65: public abstract boolean wsgen(OutputStream logStream, String[] args);
66:
67: }
|