public class JettyHTTPServerEngine extends Object implements ServerEngine
Modifier and Type | Field and Description |
---|---|
static String |
DO_NOT_CHECK_URL_PROP |
Constructor and Description |
---|
JettyHTTPServerEngine() |
JettyHTTPServerEngine(org.eclipse.jetty.util.component.Container.Listener mBeanContainer,
String host,
int port)
This constructor is called by the JettyHTTPServerEngineFactory.
|
Modifier and Type | Method and Description |
---|---|
void |
addServant(URL url,
JettyHTTPHandler handler)
Register a servant.
|
protected void |
checkRegistedContext(URL url) |
protected SSLContext |
createSSLContext(org.eclipse.jetty.util.ssl.SslContextFactory scf) |
void |
finalizeConfig()
This method is called after configure on this object.
|
org.eclipse.jetty.server.Connector |
getConnector() |
org.eclipse.jetty.server.handler.ContextHandler |
getContextHandler(URL url)
Get a registered context handler.
|
boolean |
getContinuationsEnabled() |
List<org.eclipse.jetty.server.Handler> |
getHandlers() |
String |
getHost()
Returns the host for which this server engine was configured.
|
protected KeyManager[] |
getKeyManagersWithCertAlias(KeyManager[] keyManagers) |
int |
getMaxIdleTime() |
int |
getPort()
Returns the port number for which this server engine was configured.
|
String |
getProtocol()
Returns the protocol "http" or "https" for which this engine
was configured.
|
Boolean |
getSendServerVersion() |
org.eclipse.jetty.server.Handler |
getServant(URL url)
Get a registered servant.
|
org.eclipse.jetty.server.Server |
getServer()
get the jetty server instance
|
ThreadingParameters |
getThreadingParameters()
This method returns the threading parameters that have been set.
|
TLSServerParameters |
getTlsServerParameters()
This method returns the programmatically set TLSServerParameters, not
the TLSServerParametersType, which is the JAXB generated type used
in SpringConfiguration.
|
boolean |
isReuseAddress() |
boolean |
isSessionSupport() |
boolean |
isSetThreadingParameters()
This method returns whether the threading parameters are set.
|
void |
removeServant(URL url)
Remove a previously registered servant.
|
protected void |
retrieveListenerFactory() |
protected void |
setClientAuthentication(org.eclipse.jetty.util.ssl.SslContextFactory con,
ClientAuthentication clientAuth) |
void |
setConnector(org.eclipse.jetty.server.Connector c)
set the jetty server's connector
|
void |
setContinuationsEnabled(boolean enabled) |
void |
setHandlers(List<org.eclipse.jetty.server.Handler> h)
set the jetty server's handlers
|
void |
setHost(String host) |
void |
setMaxIdleTime(int maxIdle) |
void |
setPort(int p) |
void |
setReuseAddress(boolean reuse) |
void |
setSendServerVersion(Boolean sendServerVersion) |
void |
setServer(org.eclipse.jetty.server.Server s)
Set the jetty server instance
|
void |
setSessionSupport(boolean support) |
void |
setThreadingParameters(ThreadingParameters params)
This method sets the threading parameters for this particular
server engine.
|
void |
setThreadPool(org.eclipse.jetty.util.thread.ThreadPool p) |
void |
setTlsServerParameters(TLSServerParameters params)
This method is used to programmatically set the TLSServerParameters.
|
protected void |
setupThreadPool() |
void |
shutdown()
This method will shut down the server engine and
remove it from the factory's cache.
|
protected void |
stop()
This method is called by the ServerEngine Factory to destroy the
listener.
|
public static final String DO_NOT_CHECK_URL_PROP
public JettyHTTPServerEngine(org.eclipse.jetty.util.component.Container.Listener mBeanContainer, String host, int port)
public JettyHTTPServerEngine()
public void setThreadPool(org.eclipse.jetty.util.thread.ThreadPool p)
public void setPort(int p)
public void setHost(String host)
public void setContinuationsEnabled(boolean enabled)
public boolean getContinuationsEnabled()
public String getProtocol()
public int getPort()
public String getHost()
public void shutdown()
public org.eclipse.jetty.server.Server getServer()
public void setServer(org.eclipse.jetty.server.Server s)
s
- public void setConnector(org.eclipse.jetty.server.Connector c)
c
- public void setHandlers(List<org.eclipse.jetty.server.Handler> h)
h
- public void setSessionSupport(boolean support)
public boolean isSessionSupport()
public List<org.eclipse.jetty.server.Handler> getHandlers()
public org.eclipse.jetty.server.Connector getConnector()
public boolean isReuseAddress()
public void setReuseAddress(boolean reuse)
public int getMaxIdleTime()
public void setMaxIdleTime(int maxIdle)
protected void checkRegistedContext(URL url)
public void addServant(URL url, JettyHTTPHandler handler)
addServant
in interface ServerEngine
url
- the URL associated with the servanthandler
- notified on incoming HTTP requestsprotected SSLContext createSSLContext(org.eclipse.jetty.util.ssl.SslContextFactory scf) throws Exception
Exception
protected KeyManager[] getKeyManagersWithCertAlias(KeyManager[] keyManagers) throws Exception
Exception
protected void setClientAuthentication(org.eclipse.jetty.util.ssl.SslContextFactory con, ClientAuthentication clientAuth)
protected void setupThreadPool()
public void removeServant(URL url)
removeServant
in interface ServerEngine
url
- the URL the servant was registered against.public org.eclipse.jetty.server.Handler getServant(URL url)
getServant
in interface ServerEngine
url
- the associated URLpublic org.eclipse.jetty.server.handler.ContextHandler getContextHandler(URL url)
url
- the associated URLprotected void retrieveListenerFactory()
@PostConstruct public void finalizeConfig() throws GeneralSecurityException, IOException
GeneralSecurityException
IOException
protected void stop() throws Exception
Exception
public void setTlsServerParameters(TLSServerParameters params)
IOException
public TLSServerParameters getTlsServerParameters()
public void setThreadingParameters(ThreadingParameters params)
public boolean isSetThreadingParameters()
public ThreadingParameters getThreadingParameters()
public void setSendServerVersion(Boolean sendServerVersion)
public Boolean getSendServerVersion()
Apache CXF