public class StandardHost extends ContainerBase implements Host
ContainerBase.ContainerBackgroundProcessor, ContainerBase.PrivilegedAddChild
backgroundProcessorDelay, children, cluster, CONTAINER_ARRAY, controller, domain, lifecycle, LISTENER_ARRAY, listeners, loader, logger, logName, manager, mserver, name, oname, parent, parentClassLoader, pipeline, realm, resources, startChildren, started, suffix, support, type
ADD_ALIAS_EVENT, REMOVE_ALIAS_EVENT
ADD_CHILD_EVENT, ADD_MAPPER_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_MAPPER_EVENT, REMOVE_VALVE_EVENT
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
Constructor and Description |
---|
StandardHost()
Create a new StandardHost component with the default basic Valve.
|
Modifier and Type | Method and Description |
---|---|
void |
addAlias(String alias)
Add an alias name that should be mapped to this same Host.
|
void |
addChild(Container child)
Add a child Container, only if the proposed child is an implementation
of Context.
|
ObjectName |
createObjectName(String domain,
ObjectName parent) |
void |
destroy() |
String[] |
findAliases()
Return the set of alias names for this Host.
|
String[] |
getAliases() |
String |
getAppBase()
Return the application root for this Host.
|
String |
getConfigClass()
Return the Java class name of the context configuration class
for new web applications.
|
String |
getContextClass()
Return the Java class name of the Context implementation class
for new web applications.
|
String |
getDefaultWebapp()
Return the default webapp name.
|
String |
getErrorReportValveClass()
Return the Java class name of the error report valve class
for new web applications.
|
String |
getInfo()
Return descriptive information about this Container implementation and
the corresponding version number, in the format
<description>/<version> . |
String |
getName()
Return the canonical, fully qualified, name of the virtual host
this Container represents.
|
String[] |
getValveNames()
Return the MBean Names of the Valves assoicated with this Host
|
String |
getWorkDir()
Host work directory base.
|
void |
init()
Init method, part of the MBean lifecycle.
|
ObjectName |
preRegister(MBeanServer server,
ObjectName oname) |
void |
removeAlias(String alias)
Remove the specified alias name from the aliases for this Host.
|
void |
setAppBase(String appBase)
Set the application root for this Host.
|
void |
setConfigClass(String configClass)
Set the Java class name of the context configuration class
for new web applications.
|
void |
setContextClass(String contextClass)
Set the Java class name of the Context implementation class
for new web applications.
|
void |
setDefaultWebapp(String defaultWebapp)
Set the default webapp name for this Host.
|
void |
setErrorReportValveClass(String errorReportValveClass)
Set the Java class name of the error report valve class
for new web applications.
|
void |
setName(String name)
Set the canonical, fully qualified, name of the virtual host
this Container represents.
|
void |
setWorkDir(String workDir)
Host work directory base.
|
void |
start()
Start this host.
|
String |
toString()
Return a String representation of this component.
|
addContainerListener, addLifecycleListener, addPropertyChangeListener, addValve, backgroundProcess, findChild, findChildren, findContainerListeners, findLifecycleListeners, fireContainerEvent, getBackgroundProcessorDelay, getBasic, getChildren, getCluster, getContainerSuffix, getDomain, getFirst, getJmxName, getJSR77Suffix, getLoader, getLogger, getManager, getMappingObject, getObjectName, getParent, getParentClassLoader, getParentName, getPipeline, getRealm, getResources, getStartChildren, getType, getValveObjectNames, getValves, invoke, isStarted, logName, postDeregister, postRegister, preDeregister, removeChild, removeContainerListener, removeLifecycleListener, removePropertyChangeListener, removeValve, setBackgroundProcessorDelay, setBasic, setCluster, setDomain, setLoader, setManager, setParent, setParentClassLoader, setRealm, setResources, setStartChildren, stop, threadStart, threadStop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addContainerListener, addPropertyChangeListener, backgroundProcess, findChild, findChildren, findContainerListeners, fireContainerEvent, getBackgroundProcessorDelay, getCluster, getLoader, getLogger, getManager, getMappingObject, getObjectName, getParent, getParentClassLoader, getPipeline, getRealm, getResources, invoke, isStarted, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setLoader, setManager, setParent, setParentClassLoader, setRealm, setResources
public StandardHost()
public String getAppBase()
getAppBase
in interface Host
public void setAppBase(String appBase)
setAppBase
in interface Host
appBase
- The new application rootpublic String getDefaultWebapp()
Host
getDefaultWebapp
in interface Host
public void setDefaultWebapp(String defaultWebapp)
Host
setDefaultWebapp
in interface Host
defaultWebapp
- The archive name of the webapp which will be mapped
as the root of the hostpublic String getConfigClass()
getConfigClass
in interface Host
public void setConfigClass(String configClass)
setConfigClass
in interface Host
configClass
- The new context configuration classpublic String getContextClass()
public void setContextClass(String contextClass)
contextClass
- The new context implementation classpublic String getErrorReportValveClass()
public void setErrorReportValveClass(String errorReportValveClass)
errorReportValveClass
- The new error report valve classpublic String getName()
public void setName(String name)
setName
in interface Container
setName
in interface Host
setName
in class ContainerBase
name
- Virtual host nameIllegalArgumentException
- if name is nullpublic String getWorkDir()
public void setWorkDir(String workDir)
public void addAlias(String alias)
public void addChild(Container child)
addChild
in interface Container
addChild
in class ContainerBase
child
- Child container to be addedpublic String[] findAliases()
findAliases
in interface Host
public String getInfo()
<description>/<version>
.getInfo
in interface Container
getInfo
in class ContainerBase
public void removeAlias(String alias)
removeAlias
in interface Host
alias
- Alias name to be removedpublic String toString()
public void start() throws LifecycleException
start
in interface Lifecycle
start
in class ContainerBase
LifecycleException
- if this component detects a fatal error
that prevents it from being startedpublic String[] getValveNames() throws Exception
Exception
- if an MBean cannot be created or registeredpublic String[] getAliases()
public void init()
ContainerBase
init
in class ContainerBase
public void destroy() throws Exception
destroy
in class ContainerBase
Exception
public ObjectName preRegister(MBeanServer server, ObjectName oname) throws Exception
preRegister
in interface MBeanRegistration
preRegister
in class ContainerBase
Exception
public ObjectName createObjectName(String domain, ObjectName parent) throws Exception
createObjectName
in class ContainerBase
Exception
Copyright © 2014 JBoss by Red Hat. All rights reserved.