Save This Page
Home » openejb-3.1.2-src » org.apache » openejb » core » webservices » [javadoc | source]
    1   /**
    2    *
    3    * Licensed to the Apache Software Foundation (ASF) under one or more
    4    * contributor license agreements.  See the NOTICE file distributed with
    5    * this work for additional information regarding copyright ownership.
    6    * The ASF licenses this file to You under the Apache License, Version 2.0
    7    * (the "License"); you may not use this file except in compliance with
    8    * the License.  You may obtain a copy of the License at
    9    *
   10    *     http://www.apache.org/licenses/LICENSE-2.0
   11    *
   12    *  Unless required by applicable law or agreed to in writing, software
   13    *  distributed under the License is distributed on an "AS IS" BASIS,
   14    *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   15    *  See the License for the specific language governing permissions and
   16    *  limitations under the License.
   17    */
   18   package org.apache.openejb.core.webservices;
   19   
   20   import javax.xml.namespace.QName;
   21   import javax.xml.ws.Service;
   22   import java.net.URL;
   23   import java.util.ArrayList;
   24   import java.util.List;
   25   import java.util.WeakHashMap;
   26   
   27   public class ServiceRefData {
   28       private static final WeakHashMap<Object,ServiceRefData> registry = new WeakHashMap<Object,ServiceRefData>();
   29   
   30       public static ServiceRefData getServiceRefData(Object key) {
   31           return registry.get(key);
   32       }
   33   
   34       public static ServiceRefData putServiceRefData(Object key, ServiceRefData value) {
   35           return registry.put(key, value);
   36       }
   37   
   38       private final String id;
   39       private final QName serviceQName;
   40       private final Class<? extends Service> serviceClass;
   41       private final QName portQName;
   42       private final Class<?> referenceClass;
   43       private final URL wsdlURL;
   44       private final List<HandlerChainData> handlerChains = new ArrayList<HandlerChainData>();
   45       private final List<PortRefData> portRefs = new ArrayList<PortRefData>();
   46   
   47       public ServiceRefData(String id, QName serviceQName, Class<? extends Service> serviceClass, QName portQName, Class<?> referenceClass, URL wsdlURL, List<HandlerChainData> handlerChains, List<PortRefData> portRefs) {
   48           this.id = id;
   49           this.serviceQName = serviceQName;
   50           this.serviceClass = serviceClass;
   51           this.portQName = portQName;
   52           this.referenceClass = referenceClass;
   53           this.wsdlURL = wsdlURL;
   54           if (handlerChains != null) {
   55               this.handlerChains.addAll(handlerChains);
   56           }
   57           if (portRefs != null) {
   58               this.portRefs.addAll(portRefs);
   59           }
   60       }
   61   
   62       public String getId() {
   63           return id;
   64       }
   65   
   66       public QName getServiceQName() {
   67           return serviceQName;
   68       }
   69   
   70       public Class<? extends Service> getServiceClass() {
   71           return serviceClass;
   72       }
   73   
   74       public QName getPortQName() {
   75           return portQName;
   76       }
   77   
   78       public Class<?> getReferenceClass() {
   79           return referenceClass;
   80       }
   81   
   82       public URL getWsdlURL() {
   83           return wsdlURL;
   84       }
   85   
   86       public List<HandlerChainData> getHandlerChains() {
   87           return handlerChains;
   88       }
   89   
   90       public List<PortRefData> getPortRefs() {
   91           return portRefs;
   92       }
   93   }

Save This Page
Home » openejb-3.1.2-src » org.apache » openejb » core » webservices » [javadoc | source]