Source Code Cross Referenced for Provider.java in  » 6.0-JDK-Core » xml » javax » xml » ws » spi » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » xml » javax.xml.ws.spi 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025
026        package javax.xml.ws.spi;
027
028        import javax.xml.ws.Endpoint;
029        import javax.xml.ws.WebServiceException;
030        import javax.xml.namespace.QName;
031
032        /**
033         * Service provider for <code>ServiceDelegate</code> and
034         * <code>Endpoint</code> objects.
035         * <p>
036         * 
037         * @since JAX-WS 2.0
038         */
039        public abstract class Provider {
040
041            /**
042             * A constant representing the property used to lookup the
043             * name of a <code>Provider</code> implementation 
044             * class.
045             */
046            static public final String JAXWSPROVIDER_PROPERTY = "javax.xml.ws.spi.Provider";
047
048            /**
049             * A constant representing the name of the default 
050             * <code>Provider</code> implementation class.
051             **/
052            static private final String DEFAULT_JAXWSPROVIDER = "com.sun.xml.internal.ws.spi.ProviderImpl";
053
054            /**
055             * Creates a new instance of Provider 
056             */
057            protected Provider() {
058            }
059
060            /**
061             *
062             * Creates a new provider object.
063             * <p>
064             * The algorithm used to locate the provider subclass to use consists
065             * of the following steps:
066             * <p>
067             * <ul>
068             * <li>
069             *   If a resource with the name of
070             *   <code>META-INF/services/javax.xml.ws.spi.Provider</code>
071             *   exists, then its first line, if present, is used as the UTF-8 encoded
072             *   name of the implementation class.
073             * </li>
074             * <li>
075             *   If the $java.home/lib/jaxws.properties file exists and it is readable by
076             *   the <code>java.util.Properties.load(InputStream)</code> method and it contains
077             *   an entry whose key is <code>javax.xml.ws.spi.Provider</code>, then the value of
078             *   that entry is used as the name of the implementation class.
079             * </li>
080             * <li>
081             *   If a system property with the name <code>javax.xml.ws.spi.Provider</code>
082             *   is defined, then its value is used as the name of the implementation class.
083             * </li>
084             * <li>
085             *   Finally, a default implementation class name is used.
086             * </li>
087             * </ul>
088             *
089             */
090            public static Provider provider() {
091                try {
092                    return (Provider) FactoryFinder.find(
093                            JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER);
094                } catch (WebServiceException ex) {
095                    throw ex;
096                } catch (Exception ex) {
097                    throw new WebServiceException("Unable to create Provider: "
098                            + ex.getMessage());
099                }
100
101            }
102
103            /**
104             * Creates a service delegate object.
105             * <p>
106             * @param wsdlDocumentLocation A URL pointing to the WSDL document
107             *        for the service, or <code>null</code> if there isn't one.
108             * @param serviceName The qualified name of the service.
109             * @param serviceClass The service class, which must be either
110             *        <code>javax.xml.ws.Service</code> or a subclass thereof.
111             * @return The newly created service delegate.
112             */
113            public abstract ServiceDelegate createServiceDelegate(
114                    java.net.URL wsdlDocumentLocation, QName serviceName,
115                    Class serviceClass);
116
117            /** 
118             *
119             * Creates an endpoint object with the provided binding and implementation
120             * object.
121             *
122             * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP)
123             * @param implementor A service implementation object to which
124             *        incoming requests will be dispatched. The corresponding
125             *        class must be annotated with all the necessary Web service
126             *        annotations.
127             * @return The newly created endpoint.
128             */
129            public abstract Endpoint createEndpoint(String bindingId,
130                    Object implementor);
131
132            /**
133             * Creates and publishes an endpoint object with the specified
134             * address and implementation object.
135             *
136             * @param address A URI specifying the address and transport/protocol
137             *        to use. A http: URI must result in the SOAP 1.1/HTTP
138             *        binding being used. Implementations may support other
139             *        URI schemes.
140             * @param implementor A service implementation object to which
141             *        incoming requests will be dispatched. The corresponding
142             *        class must be annotated with all the necessary Web service
143             *        annotations.
144             * @return The newly created endpoint.
145             */
146            public abstract Endpoint createAndPublishEndpoint(String address,
147                    Object implementor);
148        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.