Class JettyHTTPServerEngine
java.lang.Object
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine
- All Implemented Interfaces:
ServerEngine,org.apache.cxf.transport.http.HttpServerEngineSupport
- Direct Known Subclasses:
JettyHTTPServerEngineBeanDefinitionParser.SpringJettyHTTPServerEngine
public class JettyHTTPServerEngine
extends Object
implements ServerEngine, org.apache.cxf.transport.http.HttpServerEngineSupport
This class is the Jetty HTTP Server Engine that is configured to
work off of a designated port. The port will be enabled for
"http" or "https" depending upon its successful configuration.
-
Field Summary
FieldsFields inherited from interface org.apache.cxf.transport.http.HttpServerEngineSupport
ENABLE_HTTP2 -
Constructor Summary
ConstructorsConstructorDescriptionJettyHTTPServerEngine(org.eclipse.jetty.util.component.Container.Listener mBeanContainer, String host, int port) This constructor is called by the JettyHTTPServerEngineFactory. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddServant(URL url, JettyHTTPHandler handler) Register a servant.protected voidcheckRegistedContext(URL url) protected SSLContextcreateSSLContext(org.eclipse.jetty.util.ssl.SslContextFactory scf) protected static StringdetectProto(String proto, boolean allowSSLv3) voidThis method is called after configure on this object.org.eclipse.jetty.server.Connectororg.eclipse.jetty.server.handler.ContextHandlergetContextHandler(URL url) Get a registered context handler.booleanList<org.eclipse.jetty.server.Handler>getHost()Returns the host for which this server engine was configured.intintgetPort()Returns the port number for which this server engine was configured.Returns the protocol "http" or "https" for which this engine was configured.org.eclipse.jetty.server.HandlergetServant(URL url) Get a registered servant.org.eclipse.jetty.server.Serverget the jetty server instanceintThis method returns the threading parameters that have been set.org.apache.cxf.configuration.jsse.TLSServerParametersThis method returns the programmatically set TLSServerParameters, not the TLSServerParametersType, which is the JAXB generated type used in SpringConfiguration.booleanbooleanbooleanThis method returns whether the threading parameters are set.voidremoveServant(URL url) Remove a previously registered servant.protected voidprotected voidsetClientAuthentication(org.eclipse.jetty.util.ssl.SslContextFactory.Server con, org.apache.cxf.configuration.security.ClientAuthentication clientAuth) voidsetConnector(org.eclipse.jetty.server.Connector c) set the jetty server's connectorvoidsetContinuationsEnabled(boolean enabled) voidsetHandlers(List<org.eclipse.jetty.server.Handler> h) set the jetty server's handlersvoidvoidsetMaxIdleTime(int maxIdle) voidsetPort(int p) voidsetReuseAddress(boolean reuse) voidsetSendServerVersion(Boolean sendServerVersion) voidsetServer(org.eclipse.jetty.server.Server s) Set the jetty server instancevoidsetSessionSupport(boolean support) voidsetSessionTimeout(int sessionTimeout) voidThis method sets the threading parameters for this particular server engine.voidsetThreadPool(org.eclipse.jetty.util.thread.ThreadPool p) voidsetTlsServerParameters(org.apache.cxf.configuration.jsse.TLSServerParameters params) This method is used to programmatically set the TLSServerParameters.protected voidvoidshutdown()This method will shut down the server engine and remove it from the factory's cache.protected voidstop()This method is called by the ServerEngine Factory to destroy the listener.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cxf.transport.http.HttpServerEngineSupport
isHttp2Enabled, isHttp2Required
-
Field Details
-
DO_NOT_CHECK_URL_PROP
- See Also:
-
-
Constructor Details
-
JettyHTTPServerEngine
public JettyHTTPServerEngine(org.eclipse.jetty.util.component.Container.Listener mBeanContainer, String host, int port) This constructor is called by the JettyHTTPServerEngineFactory. -
JettyHTTPServerEngine
public JettyHTTPServerEngine()
-
-
Method Details
-
setThreadPool
public void setThreadPool(org.eclipse.jetty.util.thread.ThreadPool p) -
setPort
public void setPort(int p) -
setHost
-
setContinuationsEnabled
public void setContinuationsEnabled(boolean enabled) -
getContinuationsEnabled
public boolean getContinuationsEnabled() -
getProtocol
Returns the protocol "http" or "https" for which this engine was configured. -
getPort
public int getPort()Returns the port number for which this server engine was configured.- Returns:
-
getHost
Returns the host for which this server engine was configured.- Returns:
-
shutdown
public void shutdown()This method will shut down the server engine and remove it from the factory's cache. -
getServer
public org.eclipse.jetty.server.Server getServer()get the jetty server instance- Returns:
-
setServer
public void setServer(org.eclipse.jetty.server.Server s) Set the jetty server instance- Parameters:
s-
-
setConnector
public void setConnector(org.eclipse.jetty.server.Connector c) set the jetty server's connector- Parameters:
c-
-
setHandlers
set the jetty server's handlers- Parameters:
h-
-
setSessionSupport
public void setSessionSupport(boolean support) -
isSessionSupport
public boolean isSessionSupport() -
getHandlers
-
getConnector
public org.eclipse.jetty.server.Connector getConnector() -
isReuseAddress
public boolean isReuseAddress() -
setReuseAddress
public void setReuseAddress(boolean reuse) -
getMaxIdleTime
public int getMaxIdleTime() -
setMaxIdleTime
public void setMaxIdleTime(int maxIdle) -
checkRegistedContext
-
addServant
Register a servant.- Specified by:
addServantin interfaceServerEngine- Parameters:
url- the URL associated with the servanthandler- notified on incoming HTTP requests
-
createSSLContext
protected SSLContext createSSLContext(org.eclipse.jetty.util.ssl.SslContextFactory scf) throws Exception - Throws:
Exception
-
detectProto
-
setClientAuthentication
protected void setClientAuthentication(org.eclipse.jetty.util.ssl.SslContextFactory.Server con, org.apache.cxf.configuration.security.ClientAuthentication clientAuth) -
setupThreadPool
protected void setupThreadPool() -
removeServant
Remove a previously registered servant.- Specified by:
removeServantin interfaceServerEngine- Parameters:
url- the URL the servant was registered against.
-
getServant
Get a registered servant.- Specified by:
getServantin interfaceServerEngine- Parameters:
url- the associated URL- Returns:
- the HttpHandler if registered
-
getContextHandler
Get a registered context handler.- Parameters:
url- the associated URL- Returns:
- the HttpHandler if registered
-
retrieveListenerFactory
protected void retrieveListenerFactory() -
finalizeConfig
@PostConstruct public void finalizeConfig()This method is called after configure on this object. -
stop
This method is called by the ServerEngine Factory to destroy the listener.- Throws:
Exception
-
setTlsServerParameters
public void setTlsServerParameters(org.apache.cxf.configuration.jsse.TLSServerParameters params) This method is used to programmatically set the TLSServerParameters. This method may only be called by the factory.- Throws:
IOException
-
getTlsServerParameters
public org.apache.cxf.configuration.jsse.TLSServerParameters getTlsServerParameters()This method returns the programmatically set TLSServerParameters, not the TLSServerParametersType, which is the JAXB generated type used in SpringConfiguration.- Returns:
-
setThreadingParameters
This method sets the threading parameters for this particular server engine. This method may only be called by the factory. -
isSetThreadingParameters
public boolean isSetThreadingParameters()This method returns whether the threading parameters are set. -
getThreadingParameters
This method returns the threading parameters that have been set. This method may return null, if the threading parameters have not been set. -
setSendServerVersion
-
getSendServerVersion
-
getSessionTimeout
public int getSessionTimeout() -
setSessionTimeout
public void setSessionTimeout(int sessionTimeout)
-