org.asynchttpclient.netty.NettyAsyncHttpProviderConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of async-http-client-netty4-provider Show documentation
Show all versions of async-http-client-netty4-provider Show documentation
The Async Http Client Netty 4 Provider.
/*
* Copyright (c) 2014 AsyncHttpClient Project. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the Apache License Version 2.0 is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
*/
package org.asynchttpclient.netty;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelOption;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.util.Timer;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.asynchttpclient.AsyncHttpProviderConfig;
import org.asynchttpclient.config.AsyncHttpClientConfig;
import org.asynchttpclient.netty.channel.pool.ChannelPool;
import org.asynchttpclient.netty.handler.ConnectionStrategy;
import org.asynchttpclient.netty.handler.Http1Point1ConnectionStrategy;
import org.asynchttpclient.netty.response.EagerNettyResponseBodyPart;
import org.asynchttpclient.netty.response.LazyNettyResponseBodyPart;
import org.asynchttpclient.netty.response.NettyResponseBodyPart;
import org.asynchttpclient.netty.ws.NettyWebSocket;
/**
* This class can be used to pass Netty's internal configuration options. See
* Netty documentation for more information.
*/
public class NettyAsyncHttpProviderConfig implements AsyncHttpProviderConfig, Object> {
private final Map, Object> properties = new HashMap<>();
/**
* Add a property that will be used when the AsyncHttpClient initialize its
* {@link org.asynchttpclient.AsyncHttpProvider}
*
* @param name the name of the property
* @param value the value of the property
* @return this instance of AsyncHttpProviderConfig
*/
public NettyAsyncHttpProviderConfig addProperty(ChannelOption
© 2015 - 2025 Weber Informatics LLC | Privacy Policy