Class JettyHTTPServerEngineFactory
java.lang.Object
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory
- Direct Known Subclasses:
JettyHTTPServerEngineFactoryBeanDefinitionParser.SpringJettyHTTPServerEngineFactory
This Bus Extension handles the configuration of network port
numbers for use with "http" or "https". This factory
caches the JettyHTTPServerEngines so that they may be
retrieved if already previously configured.
-
Constructor Summary
ConstructorsConstructorDescriptionJettyHTTPServerEngineFactory(org.apache.cxf.Bus b) JettyHTTPServerEngineFactory(org.apache.cxf.Bus b, Map<String, org.apache.cxf.configuration.jsse.TLSServerParameters> tls, Map<String, ThreadingParameters> threading) -
Method Summary
Modifier and TypeMethodDescriptioncreateJettyHTTPServerEngine(int port, String protocol) Calls thru to {createJettyHTTPServerEngine(String, int, String)with a 'null' host valuecreateJettyHTTPServerEngine(String host, int port, String protocol) createJettyHTTPServerEngine(String host, int port, String protocol, String id) This call creates a new JettyHTTPServerEngine 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.org.apache.cxf.BusgetBus()org.eclipse.jetty.util.component.Container.ListenervoidvoidvoidretrieveJettyHTTPServerEngine(int port) This call retrieves a previously configured JettyHTTPServerEngine for the given port.final voidsetBus(org.apache.cxf.Bus bus) This call is used to set the bus.voidsetEnginesList(List<JettyHTTPServerEngine> enginesList) voidsetThreadingParametersMap(Map<String, ThreadingParameters> threadingParamsMap) This call sets the ThreadingParameters for a JettyHTTPServerEnginevoidsetTLSServerParametersForPort(int port, org.apache.cxf.configuration.jsse.TLSServerParameters tlsParams) calls thru to {createJettyHTTPServerEngine(String, int, String)with 'null' for host valuevoidsetTLSServerParametersForPort(String host, int port, org.apache.cxf.configuration.jsse.TLSServerParameters tlsParams) This call sets TLSServerParameters for a JettyHTTPServerEngine that will be subsequently created.voidsetTlsServerParametersMap(Map<String, org.apache.cxf.configuration.jsse.TLSServerParameters> tlsParamsMap) This call sets TLSParametersMap for a JettyHTTPServerEngine
-
Constructor Details
-
JettyHTTPServerEngineFactory
public JettyHTTPServerEngineFactory() -
JettyHTTPServerEngineFactory
public JettyHTTPServerEngineFactory(org.apache.cxf.Bus b) -
JettyHTTPServerEngineFactory
public JettyHTTPServerEngineFactory(org.apache.cxf.Bus b, Map<String, org.apache.cxf.configuration.jsse.TLSServerParameters> tls, Map<String, ThreadingParameters> threading)
-
-
Method Details
-
setBus
public final void setBus(org.apache.cxf.Bus bus) This call is used to set the bus. It should only be called once.- Parameters:
bus-
-
getBus
public org.apache.cxf.Bus getBus() -
setTlsServerParametersMap
public void setTlsServerParametersMap(Map<String, org.apache.cxf.configuration.jsse.TLSServerParameters> tlsParamsMap) This call sets TLSParametersMap for a JettyHTTPServerEngine -
getTlsServerParametersMap
-
setEnginesList
-
setThreadingParametersMap
This call sets the ThreadingParameters for a JettyHTTPServerEngine -
getThreadingParametersMap
-
setTLSServerParametersForPort
public void setTLSServerParametersForPort(String host, int port, org.apache.cxf.configuration.jsse.TLSServerParameters tlsParams) throws GeneralSecurityException, IOException This call sets TLSServerParameters for a JettyHTTPServerEngine 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, org.apache.cxf.configuration.jsse.TLSServerParameters tlsParams) throws GeneralSecurityException, IOException calls thru to {createJettyHTTPServerEngine(String, int, String)with 'null' for host value- Throws:
GeneralSecurityExceptionIOException
-
retrieveJettyHTTPServerEngine
This call retrieves a previously configured JettyHTTPServerEngine for the given port. If none exists, this call returns null. -
createJettyHTTPServerEngine
public JettyHTTPServerEngine createJettyHTTPServerEngine(String host, int port, String protocol, String id) throws GeneralSecurityException, IOException This call creates a new JettyHTTPServerEngine 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 JettyHTTPEngine 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"id- The key to reference into the tlsParametersMap. Can be null.- Returns:
- Throws:
GeneralSecurityExceptionIOException
-
createJettyHTTPServerEngine
public JettyHTTPServerEngine createJettyHTTPServerEngine(int port, String protocol) throws GeneralSecurityException, IOException Calls thru to {createJettyHTTPServerEngine(String, int, String)with a 'null' host value- Throws:
GeneralSecurityExceptionIOException
-
createJettyHTTPServerEngine
public JettyHTTPServerEngine createJettyHTTPServerEngine(String host, int port, String protocol) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityExceptionIOException
-
destroyForPort
public static void destroyForPort(int port) This method removes the Server Engine from the port map and stops it. -
getMBeanServer
-
getMBeanContainer
public org.eclipse.jetty.util.component.Container.Listener getMBeanContainer() -
initComplete
public void initComplete() -
postShutdown
public void postShutdown() -
preShutdown
public void preShutdown()
-