|
1 /* |
|
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. Oracle designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 * or visit www.oracle.com if you need additional information or have any |
|
23 * questions. |
|
24 */ |
|
25 |
|
26 package com.sun.xml.internal.ws.api.server; |
|
27 |
|
28 import com.sun.istack.internal.NotNull; |
|
29 import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; |
|
30 |
|
31 /** |
|
32 * Root of the unparsed WSDL and other resources referenced from it. |
|
33 * This object represents the description of the service |
|
34 * that a {@link WSEndpoint} offers. |
|
35 * |
|
36 * <p> |
|
37 * A description consists of a set of {@link SDDocument}, which |
|
38 * each represents a single XML document that forms a part of the |
|
39 * descriptor (for example, WSDL might refer to separate schema documents, |
|
40 * or a WSDL might refer to another WSDL.) |
|
41 * |
|
42 * <p> |
|
43 * {@link ServiceDefinition} and its descendants are immutable |
|
44 * read-only objects. Once they are created, they always return |
|
45 * the same value. |
|
46 * |
|
47 * <h2>Expected Usage</h2> |
|
48 * <p> |
|
49 * This object is intended to be used for serving the descriptors |
|
50 * to remote clients (such as by MEX, or other protocol-specific |
|
51 * metadata query, such as HTTP GET with "?wsdl" query string.) |
|
52 * |
|
53 * <p> |
|
54 * This object is <b>NOT</b> intended to be used by other |
|
55 * internal components to parse them. For that purpose, use |
|
56 * {@link WSDLModel} instead. |
|
57 * |
|
58 * @author Kohsuke Kawaguchi |
|
59 */ |
|
60 public interface ServiceDefinition extends Iterable<SDDocument> { |
|
61 /** |
|
62 * Gets the "primary" {@link SDDocument} that represents a WSDL. |
|
63 * |
|
64 * <p> |
|
65 * This WSDL eventually refers to all the other {@link SDDocument}s. |
|
66 * |
|
67 * @return |
|
68 * always non-null. |
|
69 */ |
|
70 @NotNull SDDocument getPrimary(); |
|
71 |
|
72 /** |
|
73 * Adds a filter that is called while writing {@link SDDocument}'s infoset. This |
|
74 * filter is applied to the all the other reachable {@link SDDocument}s. |
|
75 * |
|
76 * @param filter that is called while writing the document |
|
77 */ |
|
78 void addFilter(@NotNull SDDocumentFilter filter); |
|
79 } |