public ManagedHttpClientConnectionFactory(HttpMessageWriterFactory <IHttpRequest> requestWriterFactory, HttpMessageParserFactory <HttpResponse> responseParserFactory ) : base() { this.requestWriterFactory = requestWriterFactory != null ? requestWriterFactory : DefaultHttpRequestWriterFactory.Instance; this.responseParserFactory = responseParserFactory != null ? responseParserFactory : DefaultHttpResponseParserFactory.Instance; }
public DefaultManagedHttpClientConnection(string id, int buffersize, int fragmentSizeHint , CharsetDecoder chardecoder, CharsetEncoder charencoder, MessageConstraints constraints , ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy , HttpMessageWriterFactory <IHttpRequest> requestWriterFactory, HttpMessageParserFactory <HttpResponse> responseParserFactory) : base(buffersize, fragmentSizeHint, chardecoder , charencoder, constraints, incomingContentStrategy, outgoingContentStrategy, requestWriterFactory , responseParserFactory) { this.id = id; this.attributes = new ConcurrentHashMap <string, object>(); }
public DefaultBHttpClientConnectionFactory(ConnectionConfig cconfig, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, HttpMessageWriterFactory <IHttpRequest> requestWriterFactory, HttpMessageParserFactory <HttpResponse> responseParserFactory ) : base() { this.cconfig = cconfig != null ? cconfig : ConnectionConfig.Default; this.incomingContentStrategy = incomingContentStrategy; this.outgoingContentStrategy = outgoingContentStrategy; this.requestWriterFactory = requestWriterFactory; this.responseParserFactory = responseParserFactory; }
/// <summary>Creates new instance of DefaultBHttpServerConnection.</summary> /// <remarks>Creates new instance of DefaultBHttpServerConnection.</remarks> /// <param name="buffersize">buffer size. Must be a positive number.</param> /// <param name="fragmentSizeHint">fragment size hint.</param> /// <param name="chardecoder"> /// decoder to be used for decoding HTTP protocol elements. /// If <code>null</code> simple type cast will be used for byte to char conversion. /// </param> /// <param name="charencoder"> /// encoder to be used for encoding HTTP protocol elements. /// If <code>null</code> simple type cast will be used for char to byte conversion. /// </param> /// <param name="constraints"> /// Message constraints. If <code>null</code> /// <see cref="Org.Apache.Http.Config.MessageConstraints.Default">Org.Apache.Http.Config.MessageConstraints.Default /// </see> /// will be used. /// </param> /// <param name="incomingContentStrategy"> /// incoming content length strategy. If <code>null</code> /// <see cref="Org.Apache.Http.Impl.Entity.DisallowIdentityContentLengthStrategy.Instance /// ">Org.Apache.Http.Impl.Entity.DisallowIdentityContentLengthStrategy.Instance</see> /// will be used. /// </param> /// <param name="outgoingContentStrategy"> /// outgoing content length strategy. If <code>null</code> /// <see cref="Org.Apache.Http.Impl.Entity.StrictContentLengthStrategy.Instance">Org.Apache.Http.Impl.Entity.StrictContentLengthStrategy.Instance /// </see> /// will be used. /// </param> /// <param name="requestParserFactory"> /// request parser factory. If <code>null</code> /// <see cref="Org.Apache.Http.Impl.IO.DefaultHttpRequestParserFactory.Instance">Org.Apache.Http.Impl.IO.DefaultHttpRequestParserFactory.Instance /// </see> /// will be used. /// </param> /// <param name="responseWriterFactory"> /// response writer factory. If <code>null</code> /// <see cref="Org.Apache.Http.Impl.IO.DefaultHttpResponseWriterFactory.Instance">Org.Apache.Http.Impl.IO.DefaultHttpResponseWriterFactory.Instance /// </see> /// will be used. /// </param> internal DefaultBHttpServerConnection(int buffersize, int fragmentSizeHint, CharsetDecoder chardecoder, CharsetEncoder charencoder, MessageConstraints constraints, ContentLengthStrategy incomingContentStrategy, ContentLengthStrategy outgoingContentStrategy, HttpMessageParserFactory <IHttpRequest> requestParserFactory, HttpMessageWriterFactory <HttpResponse> responseWriterFactory ) : base(buffersize, fragmentSizeHint, chardecoder, charencoder, constraints, incomingContentStrategy != null ? incomingContentStrategy : DisallowIdentityContentLengthStrategy.Instance , outgoingContentStrategy) { this.requestParser = (requestParserFactory != null ? requestParserFactory : DefaultHttpRequestParserFactory .Instance).Create(GetSessionInputBuffer(), constraints); this.responseWriter = (responseWriterFactory != null ? responseWriterFactory : DefaultHttpResponseWriterFactory .Instance).Create(GetSessionOutputBuffer()); }
public LoggingManagedHttpClientConnection(string id, Log log, Log headerlog, Log wirelog, int buffersize, int fragmentSizeHint, CharsetDecoder chardecoder, CharsetEncoder charencoder, MessageConstraints constraints, ContentLengthStrategy incomingContentStrategy , ContentLengthStrategy outgoingContentStrategy, HttpMessageWriterFactory <IHttpRequest > requestWriterFactory, HttpMessageParserFactory <HttpResponse> responseParserFactory ) : base(id, buffersize, fragmentSizeHint, chardecoder, charencoder, constraints , incomingContentStrategy, outgoingContentStrategy, requestWriterFactory, responseParserFactory ) { this.log = log; this.headerlog = headerlog; this.wire = new Wire(wirelog, id); }
public DefaultBHttpClientConnectionFactory(ConnectionConfig cconfig, HttpMessageWriterFactory <IHttpRequest> requestWriterFactory, HttpMessageParserFactory <HttpResponse> responseParserFactory ) : this(cconfig, null, null, requestWriterFactory, responseParserFactory) { }