List of usage examples for org.apache.http.impl ConnSupport createEncoder
public static CharsetEncoder createEncoder(ConnectionConfig connectionConfig)
From source file:ste.web.http.BasicHttpConnectionFactory.java
public BasicHttpConnection createConnection(final Socket socket) throws IOException { final BasicHttpConnection conn = new BasicHttpConnection(this.config.getBufferSize(), this.config.getFragmentSizeHint(), ConnSupport.createDecoder(this.config), ConnSupport.createEncoder(this.config), this.config.getMessageConstraints(), this.incomingContentStrategy, this.outgoingContentStrategy, this.requestParserFactory, this.responseWriterFactory); conn.bind(socket);/* www . j a va 2 s .co m*/ return conn; }
From source file:org.apache.synapse.transport.utils.logging.LoggingNHttpClientConnectionFactory.java
public DefaultNHttpClientConnection createConnection(IOSession session) { if (targetSessionLog.isDebugEnabled() || targetWireLog.isDebugEnabled()) { session = new LoggingIOSession(targetSessionLog, targetWireLog, session, "http-sender"); }//from ww w. ja va2 s. co m if (targetConnLog.isDebugEnabled() || targetHeaderLog.isDebugEnabled()) { return new LoggingNHttpClientConnection(session, config.getBufferSize(), config.getFragmentSizeHint(), HeapByteBufferAllocator.INSTANCE, ConnSupport.createDecoder(config), ConnSupport.createEncoder(config), config.getMessageConstraints(), StrictContentLengthStrategy.INSTANCE, StrictContentLengthStrategy.INSTANCE, requestWriterFactory, responseParserFactory, targetConnLog); } else { return new DefaultNHttpClientConnection(session, config.getBufferSize(), config.getFragmentSizeHint(), HeapByteBufferAllocator.INSTANCE, ConnSupport.createDecoder(config), ConnSupport.createEncoder(config), config.getMessageConstraints(), StrictContentLengthStrategy.INSTANCE, StrictContentLengthStrategy.INSTANCE, requestWriterFactory, responseParserFactory); } }
From source file:org.apache.synapse.transport.utils.logging.LoggingNHttpServerConnectionFactory.java
public DefaultNHttpServerConnection createConnection(IOSession session) { if (sourceSessionLog.isDebugEnabled() || sourceWireLog.isDebugEnabled()) { session = new LoggingIOSession(sourceSessionLog, sourceWireLog, session, "http-listener"); }/* w w w . jav a 2 s. c om*/ if (sourceConnLog.isDebugEnabled()) { return new LoggingNHttpServerConnection(session, config.getBufferSize(), config.getFragmentSizeHint(), HeapByteBufferAllocator.INSTANCE, ConnSupport.createDecoder(config), ConnSupport.createEncoder(config), config.getMessageConstraints(), StrictContentLengthStrategy.INSTANCE, StrictContentLengthStrategy.INSTANCE, requestParserFactory, responseWriterFactory, sourceConnLog); } else { return new DefaultNHttpServerConnection(session, config.getBufferSize(), config.getFragmentSizeHint(), HeapByteBufferAllocator.INSTANCE, ConnSupport.createDecoder(config), ConnSupport.createEncoder(config), config.getMessageConstraints(), StrictContentLengthStrategy.INSTANCE, StrictContentLengthStrategy.INSTANCE, requestParserFactory, responseWriterFactory); } }