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 void
destroy()
A Dispose implementation that calls the destroy() method.void
doStart()
void
doStop()
io.undertow.Undertow.Builder
getBuilder()
int
getShutdownTimeout()
int
getStopDelayTime()
TowServletContainer
getTowServletContainer()
void
initialize()
Invoke on initialization after it has set all bean properties supplied.boolean
isAutoStart()
Returns whether the server starts automatically.void
setAjpListeners(AjpListenerConfig... ajpListenerConfigs)
void
setAutoStart(boolean autoStart)
Specifies whether the server should start automatically.void
setBufferSize(int bufferSize)
void
setDirectBuffers(boolean directBuffers)
void
setHandler(io.undertow.server.HttpHandler handler)
void
setHttpListeners(HttpListenerConfig... httpListenerConfigs)
void
setHttpsListeners(HttpsListenerConfig... httpsListenerConfigs)
void
setIoThreads(int ioThreads)
<T> void
setServerOption(org.xnio.Option<T> option, T value)
void
setServerOptions(TowOptions options)
void
setShutdownTimeout(int shutdownTimeout)
<T> void
setSocketOption(org.xnio.Option<T> option, T value)
void
setSocketOptions(TowOptions options)
void
setStopDelayTime(int stopDelayTime)
void
setSystemProperty(java.lang.String key, java.lang.String value)
void
setTowServletContainer(TowServletContainer towServletContainer)
<T> void
setWorkerOption(org.xnio.Option<T> option, T value)
void
setWorkerOptions(TowOptions options)
void
setWorkerThreads(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)
-
getStopDelayTime
public int getStopDelayTime()
-
setStopDelayTime
public void setStopDelayTime(int stopDelayTime)
-
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)
-
getTowServletContainer
public TowServletContainer getTowServletContainer()
-
setTowServletContainer
public void setTowServletContainer(TowServletContainer towServletContainer)
-
doStart
public void doStart() throws java.lang.Exception
- Overrides:
doStart
in classAbstractLifeCycle
- Throws:
java.lang.Exception
-
doStop
public void doStop()
- Overrides:
doStop
in classAbstractLifeCycle
-
initialize
public void initialize() throws java.lang.Exception
Description copied from interface:InitializableBean
Invoke on initialization after it has set all bean properties supplied.- Specified by:
initialize
in interfaceInitializableBean
- Throws:
java.lang.Exception
- if initialization fails
-
destroy
public void destroy()
Description copied from interface:DisposableBean
A Dispose implementation that calls the destroy() method.- Specified by:
destroy
in interfaceDisposableBean
-
-