|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.lib.server.Server org.apache.hadoop.lib.servlet.ServerWebApp
@InterfaceAudience.Private public abstract class ServerWebApp
Server
subclass that implements ServletContextListener
and uses its lifecycle to start and stop the server.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.lib.server.Server |
---|
Server.Status |
Field Summary | |
---|---|
static String |
SSL_ENABLED
|
Fields inherited from class org.apache.hadoop.lib.server.Server |
---|
CONF_SERVICES, CONF_SERVICES_EXT, CONF_STARTUP_STATUS, DEFAULT_LOG4J_PROPERTIES |
Constructor Summary | |
---|---|
|
ServerWebApp(String name)
Constructor. |
protected |
ServerWebApp(String name,
String homeDir,
org.apache.hadoop.conf.Configuration config)
Constructor for testing purposes. |
protected |
ServerWebApp(String name,
String homeDir,
String configDir,
String logDir,
String tempDir,
org.apache.hadoop.conf.Configuration config)
Constructor for testing purposes. |
Method Summary | |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent event)
Destroys the ServletContextListener which destroys
the Server. |
void |
contextInitialized(javax.servlet.ServletContextEvent event)
Initializes the ServletContextListener which initializes
the Server. |
InetSocketAddress |
getAuthority()
Returns the hostname:port InetSocketAddress the webserver is listening to. |
boolean |
isSslEnabled()
|
protected InetSocketAddress |
resolveAuthority()
Resolves the host & port InetSocketAddress the web server is listening to. |
void |
setAuthority(InetSocketAddress authority)
Sets an alternate hostname:port InetSocketAddress to use. |
static void |
setHomeDirForCurrentThread(String homeDir)
Method for testing purposes. |
Methods inherited from class org.apache.hadoop.lib.server.Server |
---|
checkServiceDependencies, destroy, destroyServices, ensureOperational, get, getConfig, getConfigDir, getHomeDir, getLogDir, getName, getPrefix, getPrefixedName, getStatus, getTempDir, init, initConfig, initLog, initServices, loadServices, setService, setStatus |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SSL_ENABLED
Constructor Detail |
---|
protected ServerWebApp(String name, String homeDir, String configDir, String logDir, String tempDir, org.apache.hadoop.conf.Configuration config)
protected ServerWebApp(String name, String homeDir, org.apache.hadoop.conf.Configuration config)
public ServerWebApp(String name)
#SERVER_NAME#.home.dir
.
The config directory is looked in the Java System property
#SERVER_NAME#.config.dir
, if not defined it resolves to
the #SERVER_HOME_DIR#/conf
directory.
The log directory is looked in the Java System property
#SERVER_NAME#.log.dir
, if not defined it resolves to
the #SERVER_HOME_DIR#/log
directory.
The temp directory is looked in the Java System property
#SERVER_NAME#.temp.dir
, if not defined it resolves to
the #SERVER_HOME_DIR#/temp
directory.
name
- server name.Method Detail |
---|
public static void setHomeDirForCurrentThread(String homeDir)
public void contextInitialized(javax.servlet.ServletContextEvent event)
ServletContextListener
which initializes
the Server.
contextInitialized
in interface javax.servlet.ServletContextListener
event
- servelt context event.protected InetSocketAddress resolveAuthority() throws ServerException
ServerException
- thrown if any of the above 2 properties is not defined.public void contextDestroyed(javax.servlet.ServletContextEvent event)
ServletContextListener
which destroys
the Server.
contextDestroyed
in interface javax.servlet.ServletContextListener
event
- servelt context event.public InetSocketAddress getAuthority() throws ServerException
ServerException
public void setAuthority(InetSocketAddress authority)
authority
- alterante authority.public boolean isSslEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |