public class JettyServerAddJsp extends JettyServer
| Modifier and Type | Field and Description |
|---|---|
protected Set<Integer> |
addHttpPorts |
protected boolean |
enableSessionState |
protected Executor |
executor |
protected boolean |
isSecure |
protected HttpServerProps |
props |
protected SslConfig |
sslConfig |
enableWebSocket, real| Constructor and Description |
|---|
JettyServerAddJsp(HttpServerProps props) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHttpPort(int port)
添加 HttpPort(当 ssl 时,可再开个 http 端口)
|
protected org.eclipse.jetty.servlet.ServletContextHandler |
buildHandler()
获取Server Handler
|
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)
|
HttpServerProps |
getProps() |
protected org.eclipse.jetty.servlet.ServletContextHandler |
getServletHandler() |
boolean |
isSecure() |
void |
setExecutor(Executor executor) |
enableWebSocket, setup, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenableDebug, enableHttp2, enableSsl, isSupportedHttp2protected final HttpServerProps props
protected Executor executor
protected SslConfig sslConfig
protected boolean enableSessionState
protected boolean isSecure
public JettyServerAddJsp(HttpServerProps props)
protected org.eclipse.jetty.servlet.ServletContextHandler buildHandler()
throws IOException
buildHandler in class JettyServerIOExceptionpublic boolean isSecure()
public void enableSessionState(boolean enableSessionState)
public void enableSsl(boolean enable,
SSLContext sslContext)
enableSsl in interface HttpServerConfigurepublic void addHttpPort(int port)
addHttpPort in interface HttpServerConfigurepublic HttpServerProps getProps()
public void setExecutor(Executor executor)
setExecutor in interface HttpServerConfigureprotected org.eclipse.jetty.server.ServerConnector getConnector(org.eclipse.jetty.server.Server server,
String host,
int port,
boolean autoSsl)
throws RuntimeException
RuntimeExceptionprotected org.eclipse.jetty.servlet.ServletContextHandler getServletHandler()
throws IOException
IOExceptionCopyright © 2025. All rights reserved.