/// <summary>Create a new HTTP service.</summary> /// <remarks>Create a new HTTP service.</remarks> /// <param name="processor">the processor to use on requests and responses</param> /// <param name="connStrategy">the connection reuse strategy</param> /// <param name="responseFactory">the response factory</param> /// <param name="handlerResolver">the handler resolver. May be null.</param> /// <param name="expectationVerifier">the expectation verifier. May be null.</param> /// <param name="params">the HTTP parameters</param> /// <since>4.1</since> [System.ObsoleteAttribute(@"(4.3) use HttpService(HttpProcessor, Org.Apache.Http.ConnectionReuseStrategy, Org.Apache.Http.HttpResponseFactory, HttpRequestHandlerMapper, HttpExpectationVerifier)")] public HttpService(HttpProcessor processor, ConnectionReuseStrategy connStrategy, HttpResponseFactory responseFactory, HttpRequestHandlerResolver handlerResolver, HttpExpectationVerifier expectationVerifier, HttpParams @params) : this(processor , connStrategy, responseFactory, new HttpService.HttpRequestHandlerResolverAdapter (handlerResolver), expectationVerifier) { // provided injected dependencies are immutable and deprecated methods are not used this.@params = @params; }
/// <summary>Create a new HTTP service.</summary> /// <remarks>Create a new HTTP service.</remarks> /// <param name="processor">the processor to use on requests and responses</param> /// <param name="connStrategy"> /// the connection reuse strategy. If <code>null</code> /// <see cref="Org.Apache.Http.Impl.DefaultConnectionReuseStrategy.Instance">Org.Apache.Http.Impl.DefaultConnectionReuseStrategy.Instance /// </see> /// will be used. /// </param> /// <param name="responseFactory"> /// the response factory. If <code>null</code> /// <see cref="Org.Apache.Http.Impl.DefaultHttpResponseFactory.Instance">Org.Apache.Http.Impl.DefaultHttpResponseFactory.Instance /// </see> /// will be used. /// </param> /// <param name="handlerMapper">the handler mapper. May be null.</param> /// <param name="expectationVerifier">the expectation verifier. May be null.</param> /// <since>4.3</since> public HttpService(HttpProcessor processor, ConnectionReuseStrategy connStrategy, HttpResponseFactory responseFactory, HttpRequestHandlerMapper handlerMapper, HttpExpectationVerifier expectationVerifier) : base() { this.processor = Args.NotNull(processor, "HTTP processor"); this.connStrategy = connStrategy != null ? connStrategy : DefaultConnectionReuseStrategy .Instance; this.responseFactory = responseFactory != null ? responseFactory : DefaultHttpResponseFactory .Instance; this.handlerMapper = handlerMapper; this.expectationVerifier = expectationVerifier; }
public virtual void SetExpectationVerifier(HttpExpectationVerifier expectationVerifier ) { this.expectationVerifier = expectationVerifier; }