public class JettyResourceFactory extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
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.
| Constructor and Description |
|---|
JettyResourceFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
org.eclipse.jetty.io.ByteBufferPool |
getByteBufferPool()
Return the configured
ByteBufferPool. |
Executor |
getExecutor()
Return the configured
Executor. |
org.eclipse.jetty.util.thread.Scheduler |
getScheduler()
Return the configured
Scheduler. |
void |
setByteBufferPool(org.eclipse.jetty.io.ByteBufferPool byteBufferPool)
Configure the
ByteBufferPool to use. |
void |
setExecutor(Executor executor)
Configure the
Executor to use. |
void |
setScheduler(org.eclipse.jetty.util.thread.Scheduler scheduler)
Configure the
Scheduler to use. |
void |
setThreadPrefix(String threadPrefix)
Configure the thread prefix to initialize
QueuedThreadPool executor with. |
public void setExecutor(@Nullable
Executor executor)
Executor to use.
By default, initialized with a QueuedThreadPool.
executor - the executor to usepublic void setByteBufferPool(@Nullable
org.eclipse.jetty.io.ByteBufferPool byteBufferPool)
ByteBufferPool to use.
By default, initialized with a MappedByteBufferPool.
byteBufferPool - the ByteBuffer pool to usepublic void setScheduler(@Nullable
org.eclipse.jetty.util.thread.Scheduler scheduler)
Scheduler to use.
By default, initialized with a ScheduledExecutorScheduler.
scheduler - the Scheduler to usepublic void setThreadPrefix(String threadPrefix)
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@Nullable public org.eclipse.jetty.io.ByteBufferPool getByteBufferPool()
ByteBufferPool.@Nullable public org.eclipse.jetty.util.thread.Scheduler getScheduler()
Scheduler.public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException