Class TowServer

  • All Implemented Interfaces:
    com.aspectran.core.component.bean.ablility.DisposableBean, com.aspectran.core.component.bean.ablility.InitializableBean, com.aspectran.core.util.lifecycle.LifeCycle

    public class TowServer
    extends com.aspectran.core.util.lifecycle.AbstractLifeCycle
    implements com.aspectran.core.component.bean.ablility.InitializableBean, com.aspectran.core.component.bean.ablility.DisposableBean
    The Undertow Server managed by Aspectran.
    Since:
    6.3.0
    See Also:
    Undertow
    • Constructor Detail

      • TowServer

        public TowServer()
    • 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:
        doStart in class com.aspectran.core.util.lifecycle.AbstractLifeCycle
        Throws:
        java.lang.Exception
      • doStop

        public void doStop()
        Overrides:
        doStop in class com.aspectran.core.util.lifecycle.AbstractLifeCycle
      • initialize

        public void initialize()
                        throws java.lang.Exception
        Specified by:
        initialize in interface com.aspectran.core.component.bean.ablility.InitializableBean
        Throws:
        java.lang.Exception
      • destroy

        public void destroy()
        Specified by:
        destroy in interface com.aspectran.core.component.bean.ablility.DisposableBean