类 JdkHttpClientResourceFactory
java.lang.Object
cn.taketoday.http.client.reactive.JdkHttpClientResourceFactory
- 所有已实现的接口:
cn.taketoday.beans.factory.DisposableBean,cn.taketoday.beans.factory.InitializingBean
public class JdkHttpClientResourceFactory
extends Object
implements cn.taketoday.beans.factory.InitializingBean, cn.taketoday.beans.factory.DisposableBean
Factory to manage JDK HttpClient resources such as a shared
Executor
within the lifecycle of a Infra ApplicationContext.
This factory implements InitializingBean and DisposableBean
and is expected typically to be declared as a Infra-managed bean.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidvoiddestroy()Return the configuredExecutor.voidsetExecutor(Executor executor) Configure theExecutorto use forHttpClientexchanges.voidsetThreadPrefix(String threadPrefix) Configure the thread prefix to initializeQueuedThreadPoolexecutor with.
-
字段详细资料
-
executor
-
threadPrefix
-
-
构造器详细资料
-
JdkHttpClientResourceFactory
public JdkHttpClientResourceFactory()
-
-
方法详细资料
-
setExecutor
Configure theExecutorto use forHttpClientexchanges. The given executor is started and stopped viaInitializingBeanandDisposableBean.By default, this is set to
Executors.newCachedThreadPool(ThreadFactory), which mirrorsHttpClient.Builder.executor(Executor).- 参数:
executor- the executor to use
-
getExecutor
Return the configuredExecutor. -
setThreadPrefix
Configure the thread prefix to initializeQueuedThreadPoolexecutor with. This is used only when aExecutorinstance isn'tprovided.By default set to "jetty-http".
- 参数:
threadPrefix- the thread prefix to use
-
afterPropertiesSet
- 指定者:
afterPropertiesSet在接口中cn.taketoday.beans.factory.InitializingBean- 抛出:
Exception
-
destroy
- 指定者:
destroy在接口中cn.taketoday.beans.factory.DisposableBean- 抛出:
Exception
-