public class VirtualServerFacade extends Object implements VirtualServer
VirtualServer
object from the web application.| Constructor and Description |
|---|
VirtualServerFacade(String id,
File docRoot,
WebListener... webListeners) |
| Modifier and Type | Method and Description |
|---|---|
void |
addContext(Context context,
String contextRoot)
Registers the given Context with this VirtualServer
at the given context root.
|
VirtualServerConfig |
getConfig()
Gets the current configuration of this VirtualServer.
|
Context |
getContext(String contextRoot)
Finds the Context registered at the given context root.
|
Collection<Context> |
getContexts()
Gets the collection of Context instances registered with
this VirtualServer.
|
File |
getDocRoot()
Gets the docroot of this VirtualServer.
|
String |
getID()
Return the virtual server identifier.
|
VirtualServer |
getVirtualServer() |
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.
|
void |
setDocRoot(File docRoot)
Sets the docroot of this VirtualServer.
|
void |
setID(String id)
Set the virtual server identifier string.
|
void |
setVirtualServer(VirtualServer vs) |
void |
setWebListeners(WebListener... webListeners)
Sets the collection of WebListener instances from which
this VirtualServer receives requests.
|
public VirtualServerFacade(String id, File docRoot, WebListener... webListeners)
public void setDocRoot(File docRoot)
setDocRoot in interface VirtualServerdocRoot - the docroot of this VirtualServer.public File getDocRoot()
getDocRoot in interface VirtualServerpublic String getID()
getID in interface VirtualServerpublic void setID(String id)
setID in interface VirtualServerid - New identifier for this virtual serverpublic void setWebListeners(WebListener... webListeners)
webListeners - the collection of WebListener instances from which
this VirtualServer receives requests.public Collection<WebListener> getWebListeners()
getWebListeners in interface VirtualServerpublic void addContext(Context context, String contextRoot) throws ConfigException, GlassFishException
If this VirtualServer has already been started, the given context will be started as well.
addContext in interface VirtualServercontext - the Context to registercontextRoot - the context root at which to registerConfigException - if a Context already exists
at the given context root on this VirtualServerGlassFishException - if the given context fails
to be startedpublic void removeContext(Context context) throws GlassFishException
removeContext in interface VirtualServercontext - the Context to be stopped and removedGlassFishException - if an error occurs during the stopping
or removal of the given contextpublic Context getContext(String contextRoot)
getContext in interface VirtualServercontextRoot - the context root whose Context to getpublic Collection<Context> getContexts()
getContexts in interface VirtualServerpublic void setConfig(VirtualServerConfig config) throws ConfigException
In order for the given configuration to take effect, this VirtualServer may be stopped and restarted.
setConfig in interface VirtualServerconfig - the configuration to be appliedConfigException - if the configuration requires a restart,
and this VirtualServer fails to be restartedpublic VirtualServerConfig getConfig()
getConfig in interface VirtualServerpublic void setVirtualServer(VirtualServer vs)
public VirtualServer getVirtualServer()
Copyright © 2017. All rights reserved.