Class UndertowHTTPServerEngine
- java.lang.Object
-
- org.apache.cxf.transport.http_undertow.UndertowHTTPServerEngine
-
- All Implemented Interfaces:
ServerEngine,org.apache.cxf.transport.http.HttpServerEngineSupport
- Direct Known Subclasses:
UndertowHTTPServerEngineBeanDefinitionParser.SpringUndertowHTTPServerEngine
public class UndertowHTTPServerEngine extends Object implements ServerEngine, org.apache.cxf.transport.http.HttpServerEngineSupport
-
-
Field Summary
Fields Modifier and Type Field Description static StringDO_NOT_CHECK_URL_PROPstatic StringENABLE_HTTP2_PROPDeprecated.static StringENABLE_RECORD_REQUEST_START_TIME_PROP
-
Constructor Summary
Constructors Constructor Description UndertowHTTPServerEngine()UndertowHTTPServerEngine(String host, int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddServant(URL url, UndertowHTTPHandler handler)protected voidcheckRegistedContext(URL url)protected SSLContextcreateSSLContext()io.undertow.Undertow.BuilderdecorateUndertowSocketConnection(io.undertow.Undertow.Builder builder)voidfinalizeConfig()booleangetContinuationsEnabled()List<CXFUndertowHttpHandler>getHandlers()StringgetHost()Returns the host for which this server engine was configured.protected KeyManager[]getKeyManagersWithCertAlias(KeyManager[] keyManagers)intgetMaxIdleTime()intgetPort()Returns the port number for which this server engine was configured.StringgetProtocol()Returns the protocol "http" or "https" for which this engine was configured.UndertowHTTPHandlergetServant(URL url)Get a previously registered servant.ThreadingParametersgetThreadingParameters()This method returns the threading parameters that have been set.org.apache.cxf.configuration.jsse.TLSServerParametersgetTlsServerParameters()This method returns the programmatically set TLSServerParameters, not the TLSServerParametersType, which is the JAXB generated type used in SpringConfiguration.booleanisHttp2Enabled(org.apache.cxf.Bus bus)booleanisSetThreadingParameters()This method returns whether the threading parameters are set.voidremoveServant(URL url)Remove a previously registered servant.voidsetContinuationsEnabled(boolean enabled)voidsetHandlers(List<CXFUndertowHttpHandler> h)set the Undertow server's handlersvoidsetHost(String host)voidsetMaxIdleTime(int maxIdleTime)voidsetPort(int p)voidsetThreadingParameters(ThreadingParameters params)This method sets the threading parameters for this particular server engine.voidsetTlsServerParameters(org.apache.cxf.configuration.jsse.TLSServerParameters params)This method is used to programmatically set the TLSServerParameters.voidshutdown()This method will shut down the server engine and remove it from the factory's cache.voidstop()
-
-
-
Field Detail
-
DO_NOT_CHECK_URL_PROP
public static final String DO_NOT_CHECK_URL_PROP
- See Also:
- Constant Field Values
-
ENABLE_HTTP2_PROP
@Deprecated public static final String ENABLE_HTTP2_PROP
Deprecated.Please useHttpServerEngineSupport.ENABLE_HTTP2instead.- See Also:
- Constant Field Values
-
ENABLE_RECORD_REQUEST_START_TIME_PROP
public static final String ENABLE_RECORD_REQUEST_START_TIME_PROP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UndertowHTTPServerEngine
public UndertowHTTPServerEngine(String host, int port)
-
UndertowHTTPServerEngine
public UndertowHTTPServerEngine()
-
-
Method Detail
-
addServant
public void addServant(URL url, UndertowHTTPHandler handler)
- Specified by:
addServantin interfaceServerEngine
-
isHttp2Enabled
public boolean isHttp2Enabled(org.apache.cxf.Bus bus)
- Specified by:
isHttp2Enabledin interfaceorg.apache.cxf.transport.http.HttpServerEngineSupport
-
decorateUndertowSocketConnection
public io.undertow.Undertow.Builder decorateUndertowSocketConnection(io.undertow.Undertow.Builder builder)
-
checkRegistedContext
protected void checkRegistedContext(URL url)
-
removeServant
public void removeServant(URL url)
Description copied from interface:ServerEngineRemove a previously registered servant.- Specified by:
removeServantin interfaceServerEngine- Parameters:
url- the URL the servant was registered against.
-
getServant
public UndertowHTTPHandler getServant(URL url)
Description copied from interface:ServerEngineGet a previously registered servant.- Specified by:
getServantin interfaceServerEngine- Parameters:
url- the associated URL- Returns:
- the HttpHandler if registered
-
getProtocol
public String 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
public String getHost()
Returns the host for which this server engine was configured.- Returns:
-
setPort
public void setPort(int p)
-
setHost
public void setHost(String host)
-
finalizeConfig
public void finalizeConfig()
-
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:
-
stop
public void stop()
-
shutdown
public void shutdown()
This method will shut down the server engine and remove it from the factory's cache.
-
createSSLContext
protected SSLContext createSSLContext() throws Exception
- Throws:
Exception
-
getKeyManagersWithCertAlias
protected KeyManager[] getKeyManagersWithCertAlias(KeyManager[] keyManagers) throws Exception
- Throws:
Exception
-
setThreadingParameters
public void setThreadingParameters(ThreadingParameters params)
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
public ThreadingParameters getThreadingParameters()
This method returns the threading parameters that have been set. This method may return null, if the threading parameters have not been set.
-
setContinuationsEnabled
public void setContinuationsEnabled(boolean enabled)
-
getContinuationsEnabled
public boolean getContinuationsEnabled()
-
getMaxIdleTime
public int getMaxIdleTime()
-
setMaxIdleTime
public void setMaxIdleTime(int maxIdleTime)
-
setHandlers
public void setHandlers(List<CXFUndertowHttpHandler> h)
set the Undertow server's handlers- Parameters:
h-
-
getHandlers
public List<CXFUndertowHttpHandler> getHandlers()
-
-