com.sun.enterprise.web
Class VirtualServerFacade

java.lang.Object
  extended by com.sun.enterprise.web.VirtualServerFacade
All Implemented Interfaces:
VirtualServer

public class VirtualServerFacade
extends java.lang.Object
implements VirtualServer

Facade object which masks the internal VirtualServer object from the web application.

Author:
Amy Roh

Field Summary
protected  java.util.logging.Logger _logger
           
 
Constructor Summary
VirtualServerFacade(java.lang.String id, java.io.File docRoot, WebListener... webListeners)
           
 
Method Summary
 void addContext(Context context, java.lang.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(java.lang.String contextRoot)
          Finds the Context registered at the given context root.
 java.util.Collection<Context> getContexts()
          Gets the collection of Context instances registered with this VirtualServer.
 java.io.File getDocRoot()
          Gets the docroot of this VirtualServer.
 java.lang.String getID()
          Return the virtual server identifier.
 VirtualServer getVirtualServer()
           
 java.util.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(java.io.File docRoot)
          Sets the docroot of this VirtualServer.
 void setID(java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected volatile java.util.logging.Logger _logger
Constructor Detail

VirtualServerFacade

public VirtualServerFacade(java.lang.String id,
                           java.io.File docRoot,
                           WebListener... webListeners)
Method Detail

setDocRoot

public void setDocRoot(java.io.File docRoot)
Sets the docroot of this VirtualServer.

Specified by:
setDocRoot in interface VirtualServer
Parameters:
docRoot - the docroot of this VirtualServer.

getDocRoot

public java.io.File getDocRoot()
Gets the docroot of this VirtualServer.

Specified by:
getDocRoot in interface VirtualServer

getID

public java.lang.String getID()
Return the virtual server identifier.

Specified by:
getID in interface VirtualServer

setID

public void setID(java.lang.String id)
Set the virtual server identifier string.

Specified by:
setID in interface VirtualServer
Parameters:
id - New identifier for this virtual server

setWebListeners

public void setWebListeners(WebListener... webListeners)
Sets the collection of WebListener instances from which this VirtualServer receives requests.

Parameters:
webListeners - the collection of WebListener instances from which this VirtualServer receives requests.

getWebListeners

public java.util.Collection<WebListener> getWebListeners()
Gets the collection of WebListener instances from which this VirtualServer receives requests.

Specified by:
getWebListeners in interface VirtualServer
Returns:
the collection of WebListener instances from which this VirtualServer receives requests.

addContext

public void addContext(Context context,
                       java.lang.String contextRoot)
                throws ConfigException,
                       GlassFishException
Registers the given Context with this VirtualServer at the given context root.

If this VirtualServer has already been started, the given context will be started as well.

Specified by:
addContext in interface VirtualServer
Throws:
ConfigException
GlassFishException

removeContext

public void removeContext(Context context)
                   throws GlassFishException
Stops the given context and removes it from this VirtualServer.

Specified by:
removeContext in interface VirtualServer
Throws:
GlassFishException

getContext

public Context getContext(java.lang.String contextRoot)
Finds the Context registered at the given context root.

Specified by:
getContext in interface VirtualServer

getContexts

public java.util.Collection<Context> getContexts()
Gets the collection of Context instances registered with this VirtualServer.

Specified by:
getContexts in interface VirtualServer

setConfig

public void setConfig(VirtualServerConfig config)
               throws ConfigException
Reconfigures this VirtualServer with the given configuration.

In order for the given configuration to take effect, this VirtualServer may be stopped and restarted.

Specified by:
setConfig in interface VirtualServer
Throws:
ConfigException

getConfig

public VirtualServerConfig getConfig()
Gets the current configuration of this VirtualServer.

Specified by:
getConfig in interface VirtualServer

setVirtualServer

public void setVirtualServer(VirtualServer vs)

getVirtualServer

public VirtualServer getVirtualServer()


Copyright © 2012 GlassFish Community. All Rights Reserved.