Ejemplo n.º 1
0
 /// <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;
 }
Ejemplo n.º 2
0
 public virtual void SetHandlerResolver(HttpRequestHandlerResolver handlerResolver
                                        )
 {
     this.handlerMapper = new HttpService.HttpRequestHandlerResolverAdapter(handlerResolver
                                                                            );
 }
Ejemplo n.º 3
0
 /// <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="handlerMapper">the handler mapper. May be null.</param>
 /// <since>4.3</since>
 public HttpService(HttpProcessor processor, HttpRequestHandlerMapper handlerMapper
                    ) : this(processor, null, null, handlerMapper, null)
 {
 }
Ejemplo n.º 4
0
 /// <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>
 /// <since>4.3</since>
 public HttpService(HttpProcessor processor, ConnectionReuseStrategy connStrategy,
                    HttpResponseFactory responseFactory, HttpRequestHandlerMapper handlerMapper) : this
     (processor, connStrategy, responseFactory, handlerMapper, null)
 {
 }