Class UndertowHTTPServerEngineFactory
- java.lang.Object
-
- org.apache.cxf.transport.http_undertow.UndertowHTTPServerEngineFactory
-
- Direct Known Subclasses:
UndertowHTTPServerEngineFactoryBeanDefinitionParser.SpringUndertowHTTPServerEngineFactory
public class UndertowHTTPServerEngineFactory extends Object
This Bus Extension handles the configuration of network port numbers for use with "http" or "https". This factory caches the UndertowHTTPServerEngines so that they may be retrieved if already previously configured.
-
-
Constructor Summary
Constructors Constructor Description UndertowHTTPServerEngineFactory()UndertowHTTPServerEngineFactory(Bus b)UndertowHTTPServerEngineFactory(Bus b, Map<String,TLSServerParameters> tls, Map<String,ThreadingParameters> threading)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UndertowHTTPServerEnginecreateUndertowHTTPServerEngine(int port, String protocol)Calls thru to {createUndertowHTTPServerEngine(String, int, String)with a 'null' host valueUndertowHTTPServerEnginecreateUndertowHTTPServerEngine(String host, int port, String protocol)This call creates a new UndertowHTTPServerEngine initialized for "http" or "https" on the given port.static voiddestroyForPort(int port)This method removes the Server Engine from the port map and stops it.BusgetBus()MBeanServergetMBeanServer()Map<String,ThreadingParameters>getThreadingParametersMap()Map<String,TLSServerParameters>getTlsServerParametersMap()voidinitComplete()voidpostShutdown()voidpreShutdown()UndertowHTTPServerEngineretrieveUndertowHTTPServerEngine(int port)This call retrieves a previously configured UndertowHTTPServerEngine for the given port.voidsetBus(Bus bus)This call is used to set the bus.voidsetEnginesList(List<UndertowHTTPServerEngine> enginesList)voidsetThreadingParametersMap(Map<String,ThreadingParameters> threadingParamsMap)This call sets the ThreadingParameters for a UndertowHTTPServerEnginevoidsetTLSServerParametersForPort(int port, TLSServerParameters tlsParams)calls thru to {createUndertowHTTPServerEngine(String, int, String)with 'null' for host valuevoidsetTLSServerParametersForPort(String host, int port, TLSServerParameters tlsParams)This call sets TLSServerParameters for a UndertowHTTPServerEngine that will be subsequently created.voidsetTlsServerParametersMap(Map<String,TLSServerParameters> tlsParamsMap)This call sets TLSParametersMap for a UndertowHTTPServerEngine
-
-
-
Constructor Detail
-
UndertowHTTPServerEngineFactory
public UndertowHTTPServerEngineFactory()
-
UndertowHTTPServerEngineFactory
public UndertowHTTPServerEngineFactory(Bus b)
-
UndertowHTTPServerEngineFactory
public UndertowHTTPServerEngineFactory(Bus b, Map<String,TLSServerParameters> tls, Map<String,ThreadingParameters> threading)
-
-
Method Detail
-
setBus
public final void setBus(Bus bus)
This call is used to set the bus. It should only be called once.- Parameters:
bus-
-
getBus
public Bus getBus()
-
setTlsServerParametersMap
public void setTlsServerParametersMap(Map<String,TLSServerParameters> tlsParamsMap)
This call sets TLSParametersMap for a UndertowHTTPServerEngine
-
getTlsServerParametersMap
public Map<String,TLSServerParameters> getTlsServerParametersMap()
-
setEnginesList
public void setEnginesList(List<UndertowHTTPServerEngine> enginesList)
-
setThreadingParametersMap
public void setThreadingParametersMap(Map<String,ThreadingParameters> threadingParamsMap)
This call sets the ThreadingParameters for a UndertowHTTPServerEngine
-
getThreadingParametersMap
public Map<String,ThreadingParameters> getThreadingParametersMap()
-
setTLSServerParametersForPort
public void setTLSServerParametersForPort(String host, int port, TLSServerParameters tlsParams) throws GeneralSecurityException, IOException
This call sets TLSServerParameters for a UndertowHTTPServerEngine that will be subsequently created. It will not alter an engine that has already been created for that network port.- Parameters:
host- if not null, server will listen on this address/host, otherwise, server will listen on all local addresses.port- The network port number to bind to the engine.tlsParams- The tls server parameters. Cannot be null.- Throws:
IOExceptionGeneralSecurityException
-
setTLSServerParametersForPort
public void setTLSServerParametersForPort(int port, TLSServerParameters tlsParams) throws GeneralSecurityException, IOExceptioncalls thru to {createUndertowHTTPServerEngine(String, int, String)with 'null' for host value- Throws:
GeneralSecurityExceptionIOException
-
retrieveUndertowHTTPServerEngine
public UndertowHTTPServerEngine retrieveUndertowHTTPServerEngine(int port)
This call retrieves a previously configured UndertowHTTPServerEngine for the given port. If none exists, this call returns null.
-
createUndertowHTTPServerEngine
public UndertowHTTPServerEngine createUndertowHTTPServerEngine(String host, int port, String protocol) throws GeneralSecurityException, IOException
This call creates a new UndertowHTTPServerEngine initialized for "http" or "https" on the given port. The determination of "http" or "https" will depend on configuration of the engine's bean name. If an UndertowHTTPEngine already exists, or the port is already in use, a BindIOException will be thrown. If the engine is being Spring configured for TLS a GeneralSecurityException may be thrown.- Parameters:
host- if not null, server will listen on this host/address, otherwise server will listen on all local addresses.port- listen port for serverprotocol- "http" or "https"- Returns:
- Throws:
GeneralSecurityExceptionIOException
-
createUndertowHTTPServerEngine
public UndertowHTTPServerEngine createUndertowHTTPServerEngine(int port, String protocol) throws GeneralSecurityException, IOException
Calls thru to {createUndertowHTTPServerEngine(String, int, String)with a 'null' host value- Throws:
GeneralSecurityExceptionIOException
-
destroyForPort
public static void destroyForPort(int port)
This method removes the Server Engine from the port map and stops it.
-
getMBeanServer
public MBeanServer getMBeanServer()
-
initComplete
public void initComplete()
-
postShutdown
public void postShutdown()
-
preShutdown
public void preShutdown()
-
-