Class JettyServerBase

java.lang.Object
org.noear.solon.server.jetty.JettyServerBase
All Implemented Interfaces:
org.noear.solon.boot.http.HttpServerConfigure, org.noear.solon.boot.ServerLifecycle, org.noear.solon.server.http.HttpServerConfigure, org.noear.solon.server.ServerLifecycle
Direct Known Subclasses:
JettyServer

public abstract class JettyServerBase extends Object implements org.noear.solon.server.ServerLifecycle, org.noear.solon.server.http.HttpServerConfigure
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Set<Integer>
     
    protected boolean
     
    protected Executor
     
    protected org.noear.solon.server.prop.impl.HttpServerProps
     
    protected org.noear.solon.server.ssl.SslConfig
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addHttpPort(int port)
    添加 HttpPort(当 ssl 时,可再开个 http 端口)
    void
    enableSessionState(boolean enableSessionState)
     
    void
    enableSsl(boolean enable, SSLContext sslContext)
    是否允许Ssl
    protected org.eclipse.jetty.server.ServerConnector
    getConnector(org.eclipse.jetty.server.Server server, String host, int port, boolean autoSsl)
    创建连接器(支持https)
    org.noear.solon.server.prop.impl.HttpServerProps
     
    protected org.eclipse.jetty.ee11.servlet.ServletContextHandler
     
    boolean
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.noear.solon.server.http.HttpServerConfigure

    enableDebug, enableHttp2, enableSsl, isSupportedHttp2

    Methods inherited from interface org.noear.solon.server.ServerLifecycle

    start, stop
  • Field Details

    • executor

      protected Executor executor
    • props

      protected org.noear.solon.server.prop.impl.HttpServerProps props
    • sslConfig

      protected org.noear.solon.server.ssl.SslConfig sslConfig
    • enableSessionState

      protected boolean enableSessionState
    • addHttpPorts

      protected Set<Integer> addHttpPorts
  • Constructor Details

    • JettyServerBase

      public JettyServerBase()
  • Method Details

    • isSecure

      public boolean isSecure()
    • enableSessionState

      public void enableSessionState(boolean enableSessionState)
    • enableSsl

      public void enableSsl(boolean enable, SSLContext sslContext)
      是否允许Ssl
      Specified by:
      enableSsl in interface org.noear.solon.boot.http.HttpServerConfigure
      Specified by:
      enableSsl in interface org.noear.solon.server.http.HttpServerConfigure
    • addHttpPort

      public void addHttpPort(int port)
      添加 HttpPort(当 ssl 时,可再开个 http 端口)
      Specified by:
      addHttpPort in interface org.noear.solon.boot.http.HttpServerConfigure
      Specified by:
      addHttpPort in interface org.noear.solon.server.http.HttpServerConfigure
    • getProps

      public org.noear.solon.server.prop.impl.HttpServerProps getProps()
    • setExecutor

      public void setExecutor(Executor executor)
      Specified by:
      setExecutor in interface org.noear.solon.boot.http.HttpServerConfigure
      Specified by:
      setExecutor in interface org.noear.solon.server.http.HttpServerConfigure
    • getConnector

      protected org.eclipse.jetty.server.ServerConnector getConnector(org.eclipse.jetty.server.Server server, String host, int port, boolean autoSsl) throws RuntimeException
      创建连接器(支持https)
      Throws:
      RuntimeException
      Since:
      1.6
    • getServletHandler

      protected org.eclipse.jetty.ee11.servlet.ServletContextHandler getServletHandler() throws IOException
      Throws:
      IOException