Package com.aspectran.undertow.server
Class AbstractTowServer
java.lang.Object
com.aspectran.utils.lifecycle.AbstractLifeCycle
com.aspectran.undertow.server.AbstractTowServer
- Direct Known Subclasses:
DefaultTowServer
Created: 11/25/23
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.aspectran.utils.lifecycle.LifeCycle
LifeCycle.Listener
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.undertow.Undertow.Builder
io.undertow.servlet.api.DeploymentManager
getDeploymentManager
(String deploymentName) io.undertow.servlet.api.DeploymentManager
io.undertow.server.HttpHandler
io.undertow.servlet.api.ServletContainer
getSessionHandler
(String deploymentName) int
boolean
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
setServletContainer
(io.undertow.servlet.api.ServletContainer servletContainer) void
setShutdownTimeoutSecs
(int shutdownTimeoutSecs) <T> void
setSocketOption
(org.xnio.Option<T> option, T value) void
setSocketOptions
(TowOptions options) void
setSystemProperty
(String key, String value) <T> void
setWorkerOption
(org.xnio.Option<T> option, T value) void
setWorkerOptions
(TowOptions options) void
setWorkerThreads
(int workerThreads) Methods inherited from class com.aspectran.utils.lifecycle.AbstractLifeCycle
addLifeCycleListener, doStart, doStop, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.aspectran.utils.lifecycle.LifeCycle
addLifeCycleListener, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Constructor Details
-
AbstractTowServer
public AbstractTowServer()
-
-
Method Details
-
getBuilder
public io.undertow.Undertow.Builder getBuilder() -
setHttpListeners
-
setHttpsListeners
- Throws:
IOException
-
setAjpListeners
-
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) -
setServerOptions
-
setSocketOptions
-
setWorkerOptions
-
getHandler
public io.undertow.server.HttpHandler getHandler() -
setHandler
public void setHandler(io.undertow.server.HttpHandler handler) -
getServletContainer
public io.undertow.servlet.api.ServletContainer getServletContainer() -
setServletContainer
public void setServletContainer(io.undertow.servlet.api.ServletContainer servletContainer) -
isAutoStart
public boolean isAutoStart()Returns whether the server starts automatically.- Specified by:
isAutoStart
in interfaceTowServer
- 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
-
getShutdownTimeoutSecs
public int getShutdownTimeoutSecs() -
setShutdownTimeoutSecs
public void setShutdownTimeoutSecs(int shutdownTimeoutSecs) -
setSystemProperty
-
getDeploymentManager
- Specified by:
getDeploymentManager
in interfaceTowServer
-
getDeploymentManagerByPath
- Specified by:
getDeploymentManagerByPath
in interfaceTowServer
-
getSessionHandler
- Specified by:
getSessionHandler
in interfaceTowServer
-
getSessionHandlerByPath
- Specified by:
getSessionHandlerByPath
in interfaceTowServer
-