类 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
  • 字段详细资料

    • executor

      @Nullable private Executor executor
    • byteBufferPool

      @Nullable private org.eclipse.jetty.io.ByteBufferPool byteBufferPool
    • scheduler

      @Nullable private org.eclipse.jetty.util.thread.Scheduler scheduler
    • threadPrefix

      private String threadPrefix
  • 构造器详细资料

    • JettyResourceFactory

      public JettyResourceFactory()
  • 方法详细资料

    • setExecutor

      public void setExecutor(@Nullable Executor executor)
      Configure the Executor to use.

      By default, initialized with a QueuedThreadPool.

      参数:
      executor - the executor to use
    • setByteBufferPool

      public void setByteBufferPool(@Nullable org.eclipse.jetty.io.ByteBufferPool byteBufferPool)
      Configure the ByteBufferPool to use.

      By default, initialized with a ArrayByteBufferPool.

      参数:
      byteBufferPool - the ByteBuffer pool to use
    • setScheduler

      public void setScheduler(@Nullable org.eclipse.jetty.util.thread.Scheduler scheduler)
      Configure the Scheduler to use.

      By default, initialized with a ScheduledExecutorScheduler.

      参数:
      scheduler - the Scheduler to use
    • setThreadPrefix

      public void setThreadPrefix(String threadPrefix)
      Configure the thread prefix to initialize QueuedThreadPool executor with. This is used only when a Executor instance isn't provided.

      By default set to "jetty-http".

      参数:
      threadPrefix - the thread prefix to use
    • getExecutor

      @Nullable public Executor getExecutor()
      Return the configured Executor.
    • getByteBufferPool

      @Nullable public org.eclipse.jetty.io.ByteBufferPool getByteBufferPool()
      Return the configured ByteBufferPool.
    • getScheduler

      @Nullable public org.eclipse.jetty.util.thread.Scheduler getScheduler()
      Return the configured Scheduler.
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      指定者:
      afterPropertiesSet 在接口中 cn.taketoday.beans.factory.InitializingBean
      抛出:
      Exception
    • destroy

      public void destroy() throws Exception
      指定者:
      destroy 在接口中 cn.taketoday.beans.factory.DisposableBean
      抛出:
      Exception