axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/client Service.java Call.java
Date Tue, 06 Aug 2002 18:35:51 GMT
gdaniels    2002/08/06 11:35:50

  Modified:    java/src/org/apache/axis/client Service.java Call.java
  Log:
  Transports for particular addresses are now cached in the Service, so
  that stubs will share them by default.
  
  Revision  Changes    Path
  1.66      +19 -0     xml-axis/java/src/org/apache/axis/client/Service.java
  
  Index: Service.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Service.java,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- Service.java	17 Jul 2002 20:27:28 -0000	1.65
  +++ Service.java	6 Aug 2002 18:35:49 -0000	1.66
  @@ -94,6 +94,7 @@
   import java.util.ListIterator;
   import java.util.Map;
   import java.util.Vector;
  +import java.util.Hashtable;
   
   /**
    * Axis' JAXRPC Dynamic Invoation Interface implementation of the Service
  @@ -126,6 +127,10 @@
       static private HashMap      cachedWSDL  = new HashMap();
       static private boolean      cachingWSDL = true ;
   
  +    /**
  +     * A Hashtable mapping addresses (URLs) to Transports (objects)
  +     */
  +    private Hashtable transportImpls = new Hashtable();
   
       Definition getWSDLDefinition() {
           return( wsdlDefinition );
  @@ -749,5 +754,19 @@
           public void setHandlerChain(QName portName, List chain) {
               map.put(portName, chain);
           }
  +    }
  +
  +    /**
  +     * Register a Transport for a particular URL.
  +     */
  +    void registerTransportForURL(URL url, Transport transport) {
  +        transportImpls.put(url, transport);
  +    }
  +
  +    /**
  +     * Get any registered Transport object for a given URL.
  +     */
  +    Transport getTransportForURL(URL url) {
  +        return (Transport)transportImpls.get(url);
       }
   }
  
  
  
  1.169     +2 -7      xml-axis/java/src/org/apache/axis/client/Call.java
  
  Index: Call.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v
  retrieving revision 1.168
  retrieving revision 1.169
  diff -u -r1.168 -r1.169
  --- Call.java	6 Aug 2002 12:43:27 -0000	1.168
  +++ Call.java	6 Aug 2002 18:35:49 -0000	1.169
  @@ -235,11 +235,6 @@
        */
       private static Hashtable transports  = new Hashtable();
   
  -    /**
  -     * A Hashtable mapping addresses (URLs) to Transports (objects)
  -     */
  -    private Hashtable transportImpls = new Hashtable();
  -
       /************************************************************************/
       /* Start of core JAX-RPC stuff                                          */
       /************************************************************************/
  @@ -657,7 +652,7 @@
               }
   
               // Do we already have a transport for this address?
  -            Transport transport = (Transport) transportImpls.get(address);
  +            Transport transport = service.getTransportForURL(address);
               if (transport != null) {
                   setTransport(transport);
               }
  @@ -670,7 +665,7 @@
                                    protocol), null, null);
                   transport.setUrl(address.toString());
                   setTransport(transport);
  -                transportImpls.put(address, transport);
  +                service.registerTransportForURL(address, transport);
               }
           }
           catch( Exception exp ) {
  
  
  

Mime
View raw message