Class JettyResourceFactory
java.lang.Object
org.springframework.http.client.reactive.JettyResourceFactory
- All Implemented Interfaces:
- DisposableBean,- InitializingBean
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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.voiddestroy()Invoked by the containingBeanFactoryon destruction of a bean.@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- 
JettyResourceFactorypublic JettyResourceFactory()
 
- 
- 
Method Details- 
setExecutorConfigure theExecutorto use.By default, initialized with a QueuedThreadPool.- Parameters:
- executor- the executor to use
 
- 
setByteBufferPoolConfigure theByteBufferPoolto use.By default, initialized with a ArrayByteBufferPool.- Parameters:
- byteBufferPool- the- ByteBufferpool to use
 
- 
setSchedulerConfigure theSchedulerto use.By default, initialized with a ScheduledExecutorScheduler.- Parameters:
- scheduler- the- Schedulerto use
 
- 
setThreadPrefixConfigure the thread prefix to initializeQueuedThreadPoolexecutor with. This is used only when aExecutorinstance isn'tprovided.By default set to "jetty-http". - Parameters:
- threadPrefix- the thread prefix to use
 
- 
getExecutorReturn the configuredExecutor.
- 
getByteBufferPoolReturn the configuredByteBufferPool.
- 
getSchedulerReturn the configuredScheduler.
- 
afterPropertiesSetDescription copied from interface:InitializingBeanInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. - Specified by:
- afterPropertiesSetin interface- InitializingBean
- Throws:
- Exception- in the event of misconfiguration (such as failure to set an essential property) or if initialization fails for any other reason
 
- 
destroyDescription copied from interface:DisposableBeanInvoked by the containingBeanFactoryon destruction of a bean.- Specified by:
- destroyin interface- DisposableBean
- Throws:
- Exception- in case of shutdown errors. Exceptions will get logged but not rethrown to allow other beans to release their resources as well.
 
 
-