public abstract class JettyServletServer extends Object implements HttpServletServer, Runnable
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.jetty.server.ServerConnector |
connector |
protected org.eclipse.jetty.servlet.ServletContextHandler |
context |
protected String |
contextPath |
protected String |
host |
protected org.eclipse.jetty.server.Server |
jettyServer |
protected Thread |
jettyThread |
protected String |
name |
protected String |
password |
protected int |
port |
protected Object |
startCondition |
protected String |
user |
factory
Constructor and Description |
---|
JettyServletServer(String name,
String host,
int port,
String contextPath) |
Modifier and Type | Method and Description |
---|---|
String |
getHost() |
String |
getName() |
String |
getPassword() |
int |
getPort() |
String |
getUser() |
boolean |
isAlive() |
void |
run()
Jetty Server Execution
|
void |
setBasicAuthentication(String user,
String password,
String servletPath)
enables basic authentication with user and password on the the relative path relativeUriPath
|
void |
shutdown() |
boolean |
start() |
boolean |
stop() |
String |
toString() |
boolean |
waitedStart(long maxWaitTime)
blocking start of the http server
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addServletClass, addServletPackage
protected final String name
protected final String host
protected final int port
protected String user
protected String password
protected final String contextPath
protected final org.eclipse.jetty.server.Server jettyServer
protected final org.eclipse.jetty.servlet.ServletContextHandler context
protected final org.eclipse.jetty.server.ServerConnector connector
protected volatile Thread jettyThread
protected Object startCondition
public JettyServletServer(String name, String host, int port, String contextPath) throws IllegalArgumentException
IllegalArgumentException
public void setBasicAuthentication(String user, String password, String servletPath)
setBasicAuthentication
in interface HttpServletServer
public boolean waitedStart(long maxWaitTime) throws IllegalArgumentException
HttpServletServer
waitedStart
in interface HttpServletServer
maxWaitTime
- max time to wait for the start to take placeIllegalArgumentException
- if arguments are invalidpublic boolean start() throws IllegalStateException
start
in interface org.openecomp.policy.drools.properties.Startable
IllegalStateException
public boolean stop() throws IllegalStateException
stop
in interface org.openecomp.policy.drools.properties.Startable
IllegalStateException
public void shutdown() throws IllegalStateException
shutdown
in interface org.openecomp.policy.drools.properties.Startable
IllegalStateException
public boolean isAlive()
isAlive
in interface org.openecomp.policy.drools.properties.Startable
public int getPort()
getPort
in interface HttpServletServer
public String getName()
public String getHost()
public String getUser()
public String getPassword()
Copyright © 2018. All rights reserved.