类 JettyResourceFactory
java.lang.Object
cn.taketoday.http.client.reactive.JettyResourceFactory
- 所有已实现的接口:
cn.taketoday.beans.factory.DisposableBean,cn.taketoday.beans.factory.InitializingBean
public class JettyResourceFactory
extends Object
implements cn.taketoday.beans.factory.InitializingBean, cn.taketoday.beans.factory.DisposableBean
Factory to manage Jetty resources, i.e.
Executor, ByteBufferPool and
Scheduler, within the lifecycle of a ApplicationContext.
This factory implements InitializingBean and DisposableBean
and is expected typically to be declared as a managed bean.
- 从以下版本开始:
- 4.0
- 作者:
- Sebastien Deleuze, Harry Yang
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidvoiddestroy()org.eclipse.jetty.io.ByteBufferPoolReturn the configuredByteBufferPool.Return the configuredExecutor.org.eclipse.jetty.util.thread.SchedulerReturn the configuredScheduler.voidsetByteBufferPool(org.eclipse.jetty.io.ByteBufferPool byteBufferPool) Configure theByteBufferPoolto use.voidsetExecutor(Executor executor) Configure theExecutorto use.voidsetScheduler(org.eclipse.jetty.util.thread.Scheduler scheduler) Configure theSchedulerto use.voidsetThreadPrefix(String threadPrefix) Configure the thread prefix to initializeQueuedThreadPoolexecutor with.
-
字段详细资料
-
executor
-
byteBufferPool
@Nullable private org.eclipse.jetty.io.ByteBufferPool byteBufferPool -
scheduler
@Nullable private org.eclipse.jetty.util.thread.Scheduler scheduler -
threadPrefix
-
-
构造器详细资料
-
JettyResourceFactory
public JettyResourceFactory()
-
-
方法详细资料
-
setExecutor
Configure theExecutorto use.By default, initialized with a
QueuedThreadPool.- 参数:
executor- the executor to use
-
setByteBufferPool
public void setByteBufferPool(@Nullable org.eclipse.jetty.io.ByteBufferPool byteBufferPool) Configure theByteBufferPoolto use.By default, initialized with a
ArrayByteBufferPool.- 参数:
byteBufferPool- theByteBufferpool to use
-
setScheduler
public void setScheduler(@Nullable org.eclipse.jetty.util.thread.Scheduler scheduler) Configure theSchedulerto use.By default, initialized with a
ScheduledExecutorScheduler.- 参数:
scheduler- theSchedulerto use
-
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
-
getExecutor
Return the configuredExecutor. -
getByteBufferPool
@Nullable public org.eclipse.jetty.io.ByteBufferPool getByteBufferPool()Return the configuredByteBufferPool. -
getScheduler
@Nullable public org.eclipse.jetty.util.thread.Scheduler getScheduler()Return the configuredScheduler. -
afterPropertiesSet
- 指定者:
afterPropertiesSet在接口中cn.taketoday.beans.factory.InitializingBean- 抛出:
Exception
-
destroy
- 指定者:
destroy在接口中cn.taketoday.beans.factory.DisposableBean- 抛出:
Exception
-