Class JettyResourceFactory
java.lang.Object
org.springframework.http.client.reactive.JettyResourceFactory
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
public class JettyResourceFactory
extends Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Factory to manage Jetty resources, i.e.
Executor, ByteBufferPool and
Scheduler, within the lifecycle of a Spring ApplicationContext.
This factory implements InitializingBean and DisposableBean
and is expected typically to be declared as a Spring-managed bean.
- Since:
- 5.1
- Author:
- Sebastien Deleuze
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()@Nullable org.eclipse.jetty.io.ByteBufferPoolReturn the configuredByteBufferPool.Return the configuredExecutor.@Nullable org.eclipse.jetty.util.thread.SchedulerReturn the configuredScheduler.voidsetByteBufferPool(@Nullable org.eclipse.jetty.io.ByteBufferPool byteBufferPool) Configure theByteBufferPoolto use.voidsetExecutor(@Nullable Executor executor) Configure theExecutorto use.voidsetScheduler(@Nullable org.eclipse.jetty.util.thread.Scheduler scheduler) Configure theSchedulerto use.voidsetThreadPrefix(String threadPrefix) Configure the thread prefix to initializeQueuedThreadPoolexecutor with.
-
Constructor Details
-
JettyResourceFactory
public JettyResourceFactory()
-
-
Method Details
-
setExecutor
-
setByteBufferPool
Configure theByteBufferPoolto use.By default, initialized with a
ArrayByteBufferPool.- Parameters:
byteBufferPool- theByteBufferpool to use
-
setScheduler
Configure theSchedulerto use.By default, initialized with a
ScheduledExecutorScheduler.- Parameters:
scheduler- theSchedulerto use
-
setThreadPrefix
-
getExecutor
-
getByteBufferPool
Return the configuredByteBufferPool. -
getScheduler
Return the configuredScheduler. -
afterPropertiesSet
-
destroy
-