Package org.noear.solon.boot.jetty
Class JettyServerBase
java.lang.Object
org.noear.solon.boot.jetty.JettyServerBase
- All Implemented Interfaces:
org.noear.solon.boot.http.HttpServerConfigure,org.noear.solon.boot.ServerLifecycle
- Direct Known Subclasses:
JettyServer
public abstract class JettyServerBase
extends Object
implements org.noear.solon.boot.ServerLifecycle, org.noear.solon.boot.http.HttpServerConfigure
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Executorprotected org.noear.solon.boot.prop.impl.HttpServerPropsprotected org.noear.solon.boot.ssl.SslConfig -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHttpPort(int port) 添加 HttpPort(当 ssl 时,可再开个 http 端口)voidenableSessionState(boolean enableSessionState) voidenableSsl(boolean enable, SSLContext sslContext) 是否允许Sslprotected org.eclipse.jetty.server.ServerConnectorgetConnector(org.eclipse.jetty.server.Server server, String host, int port, boolean autoSsl) 创建连接器(支持https)org.noear.solon.boot.prop.impl.HttpServerPropsgetProps()protected org.eclipse.jetty.ee11.servlet.ServletContextHandlerbooleanisSecure()voidsetExecutor(Executor executor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.noear.solon.boot.http.HttpServerConfigure
enableDebug, enableHttp2, enableSsl, isSupportedHttp2Methods inherited from interface org.noear.solon.boot.ServerLifecycle
start, stop
-
Field Details
-
executor
-
props
protected org.noear.solon.boot.prop.impl.HttpServerProps props -
sslConfig
protected org.noear.solon.boot.ssl.SslConfig sslConfig -
enableSessionState
protected boolean enableSessionState -
addHttpPorts
-
-
Constructor Details
-
JettyServerBase
public JettyServerBase()
-
-
Method Details
-
isSecure
public boolean isSecure() -
enableSessionState
public void enableSessionState(boolean enableSessionState) -
enableSsl
是否允许Ssl- Specified by:
enableSslin interfaceorg.noear.solon.boot.http.HttpServerConfigure
-
addHttpPort
public void addHttpPort(int port) 添加 HttpPort(当 ssl 时,可再开个 http 端口)- Specified by:
addHttpPortin interfaceorg.noear.solon.boot.http.HttpServerConfigure
-
getProps
public org.noear.solon.boot.prop.impl.HttpServerProps getProps() -
setExecutor
- Specified by:
setExecutorin interfaceorg.noear.solon.boot.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
-