Package com.aspectran.undertow.server
Class TowServer
- java.lang.Object
-
- com.aspectran.core.util.lifecycle.AbstractLifeCycle
-
- com.aspectran.undertow.server.TowServer
-
- All Implemented Interfaces:
DisposableBean,InitializableBean,LifeCycle
public class TowServer extends AbstractLifeCycle implements InitializableBean, DisposableBean
The Undertow Server managed by Aspectran.- Since:
- 6.3.0
- See Also:
- Undertow
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.aspectran.core.util.lifecycle.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description TowServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()A Dispose implementation that calls the destroy() method.voiddoStart()voiddoStop()io.undertow.Undertow.BuildergetBuilder()io.undertow.servlet.api.ServletContainergetServletContainer()intgetShutdownTimeout()voidinitialize()Invoke on initialization after it has set all bean properties supplied.booleanisAutoStart()Returns whether the server starts automatically.voidsetAjpListeners(AjpListenerConfig... ajpListenerConfigs)voidsetAutoStart(boolean autoStart)Specifies whether the server should start automatically.voidsetBufferSize(int bufferSize)voidsetDirectBuffers(boolean directBuffers)voidsetHandler(io.undertow.server.HttpHandler handler)voidsetHttpListeners(HttpListenerConfig... httpListenerConfigs)voidsetHttpsListeners(HttpsListenerConfig... httpsListenerConfigs)voidsetIoThreads(int ioThreads)<T> voidsetServerOption(org.xnio.Option<T> option, T value)voidsetServerOptions(TowOptions options)voidsetServletContainer(io.undertow.servlet.api.ServletContainer servletContainer)voidsetShutdownTimeout(int shutdownTimeout)<T> voidsetSocketOption(org.xnio.Option<T> option, T value)voidsetSocketOptions(TowOptions options)voidsetSystemProperty(java.lang.String key, java.lang.String value)<T> voidsetWorkerOption(org.xnio.Option<T> option, T value)voidsetWorkerOptions(TowOptions options)voidsetWorkerThreads(int workerThreads)-
Methods inherited from class com.aspectran.core.util.lifecycle.AbstractLifeCycle
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString
-
-
-
-
Method Detail
-
isAutoStart
public boolean isAutoStart()
Returns whether the server starts automatically.- Returns:
- true if the server should be started
-
setAutoStart
public void setAutoStart(boolean autoStart)
Specifies whether the server should start automatically.- Parameters:
autoStart- if the server should be started
-
getShutdownTimeout
public int getShutdownTimeout()
-
setShutdownTimeout
public void setShutdownTimeout(int shutdownTimeout)
-
setSystemProperty
public void setSystemProperty(java.lang.String key, java.lang.String value)
-
setHttpListeners
public void setHttpListeners(HttpListenerConfig... httpListenerConfigs)
-
setHttpsListeners
public void setHttpsListeners(HttpsListenerConfig... httpsListenerConfigs) throws java.io.IOException
- Throws:
java.io.IOException
-
setAjpListeners
public void setAjpListeners(AjpListenerConfig... ajpListenerConfigs)
-
setHandler
public void setHandler(io.undertow.server.HttpHandler handler)
-
setBufferSize
public void setBufferSize(int bufferSize)
-
setIoThreads
public void setIoThreads(int ioThreads)
-
setWorkerThreads
public void setWorkerThreads(int workerThreads)
-
setDirectBuffers
public void setDirectBuffers(boolean directBuffers)
-
setServerOption
public <T> void setServerOption(org.xnio.Option<T> option, T value)
-
setSocketOption
public <T> void setSocketOption(org.xnio.Option<T> option, T value)
-
setWorkerOption
public <T> void setWorkerOption(org.xnio.Option<T> option, T value)
-
getBuilder
public io.undertow.Undertow.Builder getBuilder()
-
setServerOptions
public void setServerOptions(TowOptions options)
-
setSocketOptions
public void setSocketOptions(TowOptions options)
-
setWorkerOptions
public void setWorkerOptions(TowOptions options)
-
getServletContainer
public io.undertow.servlet.api.ServletContainer getServletContainer()
-
setServletContainer
public void setServletContainer(io.undertow.servlet.api.ServletContainer servletContainer)
-
doStart
public void doStart() throws java.lang.Exception- Overrides:
doStartin classAbstractLifeCycle- Throws:
java.lang.Exception
-
doStop
public void doStop()
- Overrides:
doStopin classAbstractLifeCycle
-
initialize
public void initialize() throws java.lang.ExceptionDescription copied from interface:InitializableBeanInvoke on initialization after it has set all bean properties supplied.- Specified by:
initializein interfaceInitializableBean- Throws:
java.lang.Exception- if initialization fails
-
destroy
public void destroy()
Description copied from interface:DisposableBeanA Dispose implementation that calls the destroy() method.- Specified by:
destroyin interfaceDisposableBean
-
-