src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/SEIModel.java

Wed, 27 Apr 2016 01:27:09 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:27:09 +0800
changeset 0
373ffda63c9a
child 637
9c07ef4934dd
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/jaxws/
changeset: 657:d47a47f961ee
tag: jdk8u25-b17

aoqi@0 1 /*
aoqi@0 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 *
aoqi@0 5 * This code is free software; you can redistribute it and/or modify it
aoqi@0 6 * under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 * published by the Free Software Foundation. Oracle designates this
aoqi@0 8 * particular file as subject to the "Classpath" exception as provided
aoqi@0 9 * by Oracle in the LICENSE file that accompanied this code.
aoqi@0 10 *
aoqi@0 11 * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 14 * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 15 * accompanied this code).
aoqi@0 16 *
aoqi@0 17 * You should have received a copy of the GNU General Public License version
aoqi@0 18 * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 20 *
aoqi@0 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 22 * or visit www.oracle.com if you need additional information or have any
aoqi@0 23 * questions.
aoqi@0 24 */
aoqi@0 25
aoqi@0 26 package com.sun.xml.internal.ws.api.model;
aoqi@0 27
aoqi@0 28 import com.sun.istack.internal.NotNull;
aoqi@0 29 import com.sun.xml.internal.bind.api.Bridge;
aoqi@0 30 import com.sun.xml.internal.bind.api.JAXBRIContext;
aoqi@0 31 import com.sun.xml.internal.bind.api.TypeReference;
aoqi@0 32 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
aoqi@0 33 import com.sun.xml.internal.ws.util.Pool;
aoqi@0 34
aoqi@0 35 import javax.xml.bind.JAXBContext;
aoqi@0 36 import javax.xml.namespace.QName;
aoqi@0 37 import javax.xml.ws.Dispatch;
aoqi@0 38 import javax.xml.ws.Provider;
aoqi@0 39 import java.lang.reflect.Method;
aoqi@0 40 import java.util.Collection;
aoqi@0 41
aoqi@0 42 /**
aoqi@0 43 * Represents abstraction of SEI.
aoqi@0 44 *
aoqi@0 45 * <p>
aoqi@0 46 * This interface would be used to access which Java concepts correspond to
aoqi@0 47 * which WSDL concepts, such as which <code>wsdl:port</code> corresponds to
aoqi@0 48 * a SEI, or which <code>wsdl:operation</code> corresponds to {@link JavaMethod}.
aoqi@0 49 *
aoqi@0 50 * <P>
aoqi@0 51 * It also retains information about the databinding done for a SEI;
aoqi@0 52 * such as {@link JAXBRIContext} and {@link Bridge}.
aoqi@0 53 *
aoqi@0 54 * <p>
aoqi@0 55 * This model is constructed only when there is a Java SEI. Therefore it's
aoqi@0 56 * not available with {@link Dispatch} or {@link Provider}. Technologies that
aoqi@0 57 * need to work regardless of such surface API difference shall not be using
aoqi@0 58 * this model.
aoqi@0 59 *
aoqi@0 60 * @author Vivek Pandey
aoqi@0 61 */
aoqi@0 62 public interface SEIModel {
aoqi@0 63 Pool.Marshaller getMarshallerPool();
aoqi@0 64
aoqi@0 65 /**
aoqi@0 66 * JAXBContext that will be used to marshall/unmarshall the java classes found in the SEI.
aoqi@0 67 *
aoqi@0 68 * @return the <code>{@link JAXBRIContext}</code>
aoqi@0 69 * @deprecated Why do you need this?
aoqi@0 70 */
aoqi@0 71 JAXBContext getJAXBContext();
aoqi@0 72
aoqi@0 73 /**
aoqi@0 74 * Get the Bridge associated with the {@link TypeReference}
aoqi@0 75 *
aoqi@0 76 * @param type
aoqi@0 77 * @return the <code>{@link Bridge}</code> for the <code>type</code>
aoqi@0 78 */
aoqi@0 79 // Bridge getBridge(TypeReference type);
aoqi@0 80
aoqi@0 81 /**
aoqi@0 82 * Its a known fault if the exception thrown by {@link Method} is annotated with the
aoqi@0 83 * {@link javax.xml.ws.WebFault#name()} thas equal to the name passed as parameter.
aoqi@0 84 *
aoqi@0 85 * @param name is the qualified name of fault detail element as specified by wsdl:fault@element value.
aoqi@0 86 * @param method is the Java {@link Method}
aoqi@0 87 * @return true if <code>name</code> is the name
aoqi@0 88 * of a known fault name for the <code>method</code>
aoqi@0 89 */
aoqi@0 90 // boolean isKnownFault(QName name, Method method);
aoqi@0 91
aoqi@0 92 /**
aoqi@0 93 * Checks if the {@link JavaMethod} for the {@link Method} knowns the exception class.
aoqi@0 94 *
aoqi@0 95 * @param m {@link Method} to pickup the right {@link JavaMethod} model
aoqi@0 96 * @param ex exception class
aoqi@0 97 * @return true if <code>ex</code> is a Checked Exception
aoqi@0 98 * for <code>m</code>
aoqi@0 99 */
aoqi@0 100 // boolean isCheckedException(Method m, Class ex);
aoqi@0 101
aoqi@0 102 /**
aoqi@0 103 * This method will be useful to get the {@link JavaMethod} corrrespondiong to
aoqi@0 104 * a {@link Method} - such as on the client side.
aoqi@0 105 *
aoqi@0 106 * @param method for which {@link JavaMethod} is asked for
aoqi@0 107 * @return the {@link JavaMethod} representing the <code>method</code>
aoqi@0 108 */
aoqi@0 109 JavaMethod getJavaMethod(Method method);
aoqi@0 110
aoqi@0 111 /**
aoqi@0 112 * Gives a {@link JavaMethod} for a given {@link QName}. The {@link QName} will
aoqi@0 113 * be equivalent to the SOAP Body or Header block or can simply be the name of an
aoqi@0 114 * infoset that corresponds to the payload.
aoqi@0 115 * @param name
aoqi@0 116 * @return the <code>JavaMethod</code> associated with the
aoqi@0 117 * operation named name
aoqi@0 118 */
aoqi@0 119 public JavaMethod getJavaMethod(QName name);
aoqi@0 120
aoqi@0 121 /**
aoqi@0 122 * Gives the JavaMethod associated with the wsdl operation
aoqi@0 123 * @param operationName QName of the wsdl operation
aoqi@0 124 * @return
aoqi@0 125 */
aoqi@0 126 public JavaMethod getJavaMethodForWsdlOperation(QName operationName);
aoqi@0 127
aoqi@0 128
aoqi@0 129 /**
aoqi@0 130 * Gives all the {@link JavaMethod} for a wsdl:port for which this {@link SEIModel} is
aoqi@0 131 * created.
aoqi@0 132 *
aoqi@0 133 * @return a {@link Collection} of {@link JavaMethod}
aoqi@0 134 * associated with the {@link SEIModel}
aoqi@0 135 */
aoqi@0 136 Collection<? extends JavaMethod> getJavaMethods();
aoqi@0 137
aoqi@0 138 /**
aoqi@0 139 * Location of the WSDL that defines the port associated with the {@link SEIModel}
aoqi@0 140 *
aoqi@0 141 * @return wsdl location uri - always non-null
aoqi@0 142 */
aoqi@0 143 @NotNull String getWSDLLocation();
aoqi@0 144
aoqi@0 145 /**
aoqi@0 146 * wsdl:service qualified name for the port associated with the {@link SEIModel}
aoqi@0 147 *
aoqi@0 148 * @return wsdl:service@name value - always non-null
aoqi@0 149 */
aoqi@0 150 @NotNull QName getServiceQName();
aoqi@0 151
aoqi@0 152 /**
aoqi@0 153 * Gets the {@link WSDLPort} that represents the port that this SEI binds to.
aoqi@0 154 */
aoqi@0 155 @NotNull WSDLPort getPort();
aoqi@0 156
aoqi@0 157 /**
aoqi@0 158 * Value of the wsdl:port name associated with the {@link SEIModel}
aoqi@0 159 *
aoqi@0 160 * @return wsdl:service/wsdl:port@name value, always non-null
aoqi@0 161 */
aoqi@0 162 @NotNull QName getPortName();
aoqi@0 163
aoqi@0 164 /**
aoqi@0 165 * Value of wsdl:portType bound to the port associated with the {@link SEIModel}
aoqi@0 166 *
aoqi@0 167 * @return
aoqi@0 168 */
aoqi@0 169 @NotNull QName getPortTypeName();
aoqi@0 170
aoqi@0 171 /**
aoqi@0 172 * Gives the wsdl:binding@name value
aoqi@0 173 */
aoqi@0 174 @NotNull QName getBoundPortTypeName();
aoqi@0 175
aoqi@0 176 /**
aoqi@0 177 * Namespace of the wsd;:port associated with the {@link SEIModel}
aoqi@0 178 */
aoqi@0 179 @NotNull String getTargetNamespace();
aoqi@0 180 }

mercurial