Package com.aspectran.undertow.server
Class AbstractTowServer
java.lang.Object
com.aspectran.utils.lifecycle.AbstractLifeCycle
com.aspectran.undertow.server.AbstractTowServer
- All Implemented Interfaces:
TowServer,com.aspectran.utils.lifecycle.LifeCycle
- Direct Known Subclasses:
DefaultTowServer
public abstract class AbstractTowServer
extends com.aspectran.utils.lifecycle.AbstractLifeCycle
implements TowServer
Created: 11/25/23
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.aspectran.utils.lifecycle.LifeCycle
com.aspectran.utils.lifecycle.LifeCycle.Listener -
Field Summary
Fields inherited from interface com.aspectran.utils.lifecycle.LifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.undertow.Undertow.Builderio.undertow.servlet.api.DeploymentManagergetDeploymentManager(String deploymentName) io.undertow.servlet.api.DeploymentManagerio.undertow.server.HttpHandlerio.undertow.servlet.api.ServletContainercom.aspectran.core.component.session.SessionHandlergetSessionHandler(String deploymentName) com.aspectran.core.component.session.SessionHandlerintbooleanReturns 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) voidsetShutdownTimeoutSecs(int shutdownTimeoutSecs) <T> voidsetSocketOption(org.xnio.Option<T> option, T value) voidsetSocketOptions(TowOptions options) voidsetSystemProperty(String key, String value) <T> voidsetWorkerOption(org.xnio.Option<T> option, T value) voidsetWorkerOptions(TowOptions options) voidsetWorkerThreads(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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
isAutoStartin 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:
getDeploymentManagerin interfaceTowServer
-
getDeploymentManagerByPath
- Specified by:
getDeploymentManagerByPathin interfaceTowServer
-
getSessionHandler
- Specified by:
getSessionHandlerin interfaceTowServer
-
getSessionHandlerByPath
- Specified by:
getSessionHandlerByPathin interfaceTowServer
-