View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2008 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.impl.wsdl.support.http;
14  
15  import org.apache.commons.httpclient.HostConfiguration;
16  import org.apache.commons.httpclient.util.LangUtils;
17   
18  public class SoapUIHostConfiguration extends HostConfiguration {
19  
20      public static final String SOAPUI_SSL_CONFIG = "soapui.sslConfig";
21  
22      public SoapUIHostConfiguration() {
23          super();
24      }
25      
26      public SoapUIHostConfiguration (final HostConfiguration hostConfiguration) {
27         super( hostConfiguration );
28      }
29  
30      public Object clone() {
31          return new SoapUIHostConfiguration(this);
32      }    
33      
34      public synchronized boolean equals(final Object o) {
35     	 
36     	 boolean result = super.equals( o );
37     	 if( result && o instanceof SoapUIHostConfiguration)
38     	 {
39             SoapUIHostConfiguration that = (SoapUIHostConfiguration) o;
40              return LangUtils.equals(getParams().getParameter( SOAPUI_SSL_CONFIG ),
41              			that.getParams().getParameter( SOAPUI_SSL_CONFIG ) );
42         } 
43     	 else 
44         {
45            return false;
46         }
47      }
48  
49      public synchronized int hashCode() {
50          int hash = super.hashCode();
51          hash = LangUtils.hashCode( hash, getParams().getParameter( SOAPUI_SSL_CONFIG ) );
52          return hash;
53      }
54  }