KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > webservice > spi > ProviderImpl


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.webservice.spi;
25
26 /**
27  * Implementation of the provider interface suited to
28  * the application server needs.
29  *
30  * @author Jerome Dochez
31  */

32
33 import java.util.ArrayList JavaDoc;
34 import java.util.logging.Level JavaDoc;
35
36 import javax.xml.ws.Endpoint;
37 import javax.xml.namespace.QName JavaDoc;
38
39 import javax.xml.ws.spi.Provider;
40 import javax.xml.ws.spi.ServiceDelegate;
41
42 public class ProviderImpl extends Provider {
43     
44     javax.xml.ws.spi.Provider delegateProvider;
45     
46     /*
47      * default construtor use our JAX-WS implementation to delegate most of the
48      * work
49      */

50     public ProviderImpl() {
51         delegateProvider = new com.sun.xml.ws.spi.ProviderImpl();
52     }
53     
54     @Override JavaDoc
55     public Endpoint createEndpoint(String JavaDoc bindingId, Object JavaDoc implementor) {
56         return delegateProvider.createEndpoint(bindingId, implementor);
57     }
58
59     @Override JavaDoc
60     public javax.xml.ws.spi.ServiceDelegate createServiceDelegate(
61          java.net.URL JavaDoc wsdlDocumentLocation,
62          QName JavaDoc serviceName, Class JavaDoc serviceClass) {
63
64          javax.xml.ws.spi.ServiceDelegate delegate =
65                  delegateProvider.createServiceDelegate(wsdlDocumentLocation,
66                     serviceName, serviceClass);
67          
68          return DefaultServiceDelegateFactory.getFactory().create(delegate);
69     }
70
71     @Override JavaDoc
72     public Endpoint createAndPublishEndpoint(String JavaDoc address,
73                                              Object JavaDoc implementor) {
74         return delegateProvider.createAndPublishEndpoint(address, implementor);
75     }
76 }
77         
Popular Tags