View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2009 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  
21  	public static final String SOAPUI_SSL_CONFIG = "soapui.sslConfig";
22  
23  	public SoapUIHostConfiguration()
24  	{
25  		super();
26  	}
27  
28  	public SoapUIHostConfiguration( final HostConfiguration hostConfiguration )
29  	{
30  		super( hostConfiguration );
31  	}
32  
33  	public Object clone()
34  	{
35  		return new SoapUIHostConfiguration( this );
36  	}
37  
38  	public synchronized boolean equals( final Object o )
39  	{
40  
41  		boolean result = super.equals( o );
42  		if( result && o instanceof SoapUIHostConfiguration )
43  		{
44  			SoapUIHostConfiguration that = ( SoapUIHostConfiguration )o;
45  			return LangUtils.equals( getParams().getParameter( SOAPUI_SSL_CONFIG ), that.getParams().getParameter(
46  					SOAPUI_SSL_CONFIG ) );
47  		}
48  		else
49  		{
50  			return false;
51  		}
52  	}
53  
54  	public synchronized int hashCode()
55  	{
56  		int hash = super.hashCode();
57  		hash = LangUtils.hashCode( hash, getParams().getParameter( SOAPUI_SSL_CONFIG ) );
58  		return hash;
59  	}
60  }