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.settings;
14  
15  import com.eviware.soapui.impl.wsdl.support.CompressionSupport;
16  import com.eviware.soapui.settings.Setting.SettingType;
17  
18  /***
19   * HTTP-related settings constants
20   * 
21   * @author Ole.Matzura
22   */
23  
24  public interface HttpSettings
25  {
26  	public final static long DEFAULT_SOCKET_TIMEOUT = 60000L;
27  
28  	public static final String HTTP_VERSION_0_9 = "0.9";
29  	public static final String HTTP_VERSION_1_0 = "1.0";
30  	public static final String HTTP_VERSION_1_1 = "1.1";
31  
32  	@Setting( name = "HTTP Version", description = "Select HTTP Version to use", type = SettingType.ENUMERATION, values = {
33  			HTTP_VERSION_0_9, HTTP_VERSION_1_0, HTTP_VERSION_1_1 } )
34  	public static final String HTTP_VERSION = HttpSettings.class.getSimpleName() + "@" + "http_version";
35  
36  	@Setting( name = "User-Agent Header", description = "User-Agent HTTP header to send, blank will send default" )
37  	public final static String USER_AGENT = HttpSettings.class.getSimpleName() + "@" + "user-agent";
38  
39  	@Setting( name = "Request compression", description = "", type = SettingType.ENUMERATION, values = { "None",
40  			CompressionSupport.ALG_GZIP, CompressionSupport.ALG_DEFLATE } )
41  	public final static String REQUEST_COMPRESSION = HttpSettings.class.getSimpleName() + "@" + "request-compression";
42  
43  	@Setting( name = "Response compression", description = "Accept compressed responses from hosts", type = SettingType.BOOLEAN )
44  	public final static String RESPONSE_COMPRESSION = HttpSettings.class.getSimpleName() + "@" + "response-compression";
45  
46  	@Setting( name = "Disable Response Decompression", description = "Disable decompression of compressed responses", type = SettingType.BOOLEAN )
47  	public static final String DISABLE_RESPONSE_DECOMPRESSION = HttpSettings.class.getSimpleName()
48  			+ "@disable_response_decompression";
49  
50  	@Setting( name = "Close connections after request", description = "Closes the HTTP connection after each SOAP request", type = SettingType.BOOLEAN )
51  	public final static String CLOSE_CONNECTIONS = HttpSettings.class.getSimpleName() + "@" + "close-connections";
52  
53  	//@Setting( name = "Disable Chunking", description = "Disables content-chunking", type = SettingType.BOOLEAN )
54  	//public static final String DISABLE_CHUNKING = HttpSettings.class.getSimpleName() + "@" + "disable_chunking";
55  	
56  	@Setting( name = "Chunking Threshold", description = "Uses content-chunking for requests larger than threshold, blank to disable", type = SettingType.INT )
57  	public static final String CHUNKING_THRESHOLD = HttpSettings.class.getSimpleName() + "@" + "chunking_threshold";
58  
59  	@Setting( name = "Authenticate Preemptively", description = "Adds authentication information to outgoing request", type = SettingType.BOOLEAN )
60  	public final static String AUTHENTICATE_PREEMPTIVELY = HttpSettings.class.getSimpleName() + "@"
61  			+ "authenticate-preemptively";
62  
63  	@Setting( name = "Expect-Continue", description = "Adds Expect-Continue header to outgoing request", type = SettingType.BOOLEAN )
64  	public final static String EXPECT_CONTINUE = HttpSettings.class.getSimpleName() + "@expect-continue";
65  	
66  	@Setting( name = "Pre-encoded Endpoints", description = "Do not URL-escape service endpoints", type = SettingType.BOOLEAN )
67  	public static final String ENCODED_URLS = HttpSettings.class.getSimpleName() + "@" + "encoded_urls";
68  
69  	@Setting( name = "Bind Address", description = "Default local address to bind to when sending requests" )
70  	public static final String BIND_ADDRESS = HttpSettings.class.getSimpleName() + "@" + "bind_address";
71  
72  	@Setting( name = "Include request in time taken", description = "Includes the time it took to write the request in time-taken", type = SettingType.BOOLEAN )
73  	public final static String INCLUDE_REQUEST_IN_TIME_TAKEN = HttpSettings.class.getSimpleName() + "@"
74  			+ "include_request_in_time_taken";
75  
76  	@Setting( name = "Include response in time taken", description = "Includes the time it took to read the entire response in time-taken", type = SettingType.BOOLEAN )
77  	public final static String INCLUDE_RESPONSE_IN_TIME_TAKEN = HttpSettings.class.getSimpleName() + "@"
78  			+ "include_response_in_time_taken";
79  
80  	@Setting( name = "Socket Timeout", description = "Socket timeout in milliseconds" )
81  	public final static String SOCKET_TIMEOUT = HttpSettings.class.getSimpleName() + "@" + "socket_timeout";
82  
83  	@Setting( name = "Max response size", description = "Maximum size to read from response (0 = no limit)" )
84  	public final static String MAX_RESPONSE_SIZE = HttpSettings.class.getSimpleName() + "@" + "max_response_size";
85  
86  	@Setting( name = "Max Connections Per Host", description = "Maximum number of Connections Per Host" )
87  	public static final String MAX_CONNECTIONS_PER_HOST = HttpSettings.class.getSimpleName() + "@"
88  			+ "max_connections_per_host";
89  
90  	@Setting( name = "Max Total Connections", description = "Maximum number of Total Connections" )
91  	public static final String MAX_TOTAL_CONNECTIONS = HttpSettings.class.getSimpleName() + "@"
92  			+ "max_total_connections";
93  
94  	@Setting( name = "Leave MockEngine", description = "Leave MockEngine running when stopping MockServices", type = SettingType.BOOLEAN )
95  	public static final String LEAVE_MOCKENGINE = HttpSettings.class.getSimpleName() + "@" + "leave_mockengine";
96  
97  	@Setting( name = "Enable Mock HTTP Log", description = "Logs wire content of all mock requests", type = SettingType.BOOLEAN )
98  	public static final String ENABLE_MOCK_WIRE_LOG = HttpSettings.class.getSimpleName() + "@" + "enable_mock_wire_log";
99  
100 }