Class UndertowHTTPServerEngine

java.lang.Object
org.apache.cxf.transport.http_undertow.UndertowHTTPServerEngine
All Implemented Interfaces:
ServerEngine, HttpServerEngineSupport
Direct Known Subclasses:
UndertowHTTPServerEngineBeanDefinitionParser.SpringUndertowHTTPServerEngine

public class UndertowHTTPServerEngine extends Object implements ServerEngine, HttpServerEngineSupport
  • Field Details

  • Constructor Details

    • UndertowHTTPServerEngine

      public UndertowHTTPServerEngine(String host, int port)
    • UndertowHTTPServerEngine

      public UndertowHTTPServerEngine()
  • Method Details

    • addServant

      public void addServant(URL url, UndertowHTTPHandler handler)
      Specified by:
      addServant in interface ServerEngine
    • isHttp2Enabled

      public boolean isHttp2Enabled(Bus bus)
      Description copied from interface: HttpServerEngineSupport
      Check if Http2 is enabled on the Bus or system property Default if not configured otherwise is true
      Specified by:
      isHttp2Enabled in interface HttpServerEngineSupport
      Returns:
    • 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: ServerEngine
      Remove a previously registered servant.
      Specified by:
      removeServant in interface ServerEngine
      Parameters:
      url - the URL the servant was registered against.
    • getServant

      public UndertowHTTPHandler getServant(URL url)
      Description copied from interface: ServerEngine
      Get a previously registered servant.
      Specified by:
      getServant in interface ServerEngine
      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(TLSServerParameters params)
      This method is used to programmatically set the TLSServerParameters. This method may only be called by the factory.
      Throws:
      IOException
    • getTlsServerParameters

      public 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()