|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface VirtualServer
Representation of a virtual server.
Instances of VirtualServer may be in one of two states: stopped or started. Any requests mapped to a VirtualServer that was stopped will result in a response with a status code equal to javax.servlet.http.HttpServletResponse#SC_NOT_FOUND.
| Method Summary | |
|---|---|
void |
addContext(Context context,
String contextRoot)
Registers the given Context with this VirtualServer at the given context root. |
void |
addValve(Valve valve)
Adds the given Valve to this VirtualServer |
Context |
findContext(String contextRoot)
Finds the Context registered at the given context root. |
VirtualServerConfig |
getConfig()
Gets the current configuration of this VirtualServer. |
Collection<Context> |
getContexts()
Gets the collection of Context instances registered with this VirtualServer. |
File |
getDocRoot()
Gets the docroot of this VirtualServer. |
String |
getID()
Gets the id of this VirtualServer. |
Collection<WebListener> |
getWebListeners()
Gets the collection of WebListener instances from which this VirtualServer receives requests. |
void |
removeContext(Context context)
Stops the given context and removes it from this VirtualServer. |
void |
setConfig(VirtualServerConfig config)
Reconfigures this VirtualServer with the given configuration. |
| Methods inherited from interface org.glassfish.api.embedded.web.Lifecycle |
|---|
disable, enable |
| Method Detail |
|---|
String getID()
File getDocRoot()
Collection<WebListener> getWebListeners()
void addValve(Valve valve)
valve - the Valve to be added
void addContext(Context context,
String contextRoot)
throws ConfigException,
LifecycleException
If this VirtualServer has already been started, the given context will be started as well.
context - the Context to registercontextRoot - the context root at which to register
ConfigException - if a Context already exists
at the given context root on this VirtualServer
LifecycleException - if the given context fails
to be startedvoid removeContext(Context context)
context - the Context to be stopped and removed
LifecycleException - if an error occurs during the stopping
or removal of the given contextContext findContext(String contextRoot)
contextRoot - the context root whose Context to get
Collection<Context> getContexts()
void setConfig(VirtualServerConfig config)
throws ConfigException
In order for the given configuration to take effect, this VirtualServer may be stopped and restarted.
config - the configuration to be applied
ConfigException - if the configuration requires a restart,
and this VirtualServer fails to be restartedVirtualServerConfig getConfig()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.
Generated on 12-March-2010 04:35