Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » tomcat » core » [javadoc | source]
org.apache.tomcat.core
public class: ContextManager [javadoc | source]
java.lang.Object
   org.apache.tomcat.core.ContextManager

All Implemented Interfaces:
    Server

A collection class representing the Contexts associated with a particular Server. The managed Contexts can be accessed directly by name, or indirectly by requesting the Context responsible for processing a particular path. One particular Context can be distinguished as the default Context, which is selected to process paths for which no other Context is responsible.
Field Summary
 String hostname    The virtual host name for the Server this ContextManager is associated with. XXX Why is this here instead of in the Server? 
 int port    The port number being listed to by the Server this ContextManager is associated with. XXX Why is this here instead of in the Server? 
Constructor:
 public ContextManager() 
Method from org.apache.tomcat.core.ContextManager Summary:
addContext,   getContext,   getContextByPath,   getContextNames,   getDefaultContext,   getDocumentBase,   getHostName,   getPort,   getServerInfo,   removeContext,   service,   setDefaultContext,   setDocumentBase,   setHostName,   setPort,   setServerInfo
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.core.ContextManager Detail:
 public Context addContext(String path,
    URL docBase) 
    Adds a new Context to the set managed by this ContextManager. XXX Why is there no context name argument? XXX Should this be synchronized?
 public Context getContext(String name) 
    Gets a context by it's name, or null if there is no such context.
 public Context getContextByPath(String path) 
    Gets the context that is responsible for requests for a particular path. If no specifically assigned Context can be identified, returns the default Context.
 public Enumeration getContextNames() 
    Get the names of all the contexts in this server.
 public Context getDefaultContext() 
    Gets the default Context for this server.
 public URL getDocumentBase() 
    Gets the document base of the default context for this server.
 public String getHostName() 
    Gets the virtual host name of this server.
 public int getPort() 
    Gets the port number on which this server listens.
 public String getServerInfo() 
    Gets the server info string for this server
 public  void removeContext(String name) 
    Removes a context from service. XXX Should this be synchronized?
 public  void service(Request rrequest,
    Response rresponse) 
    Common for all connectors, needs to be shared in order to avoid code duplication
 public  void setDefaultContext(Context ctx) 
    Sets the default Context for this server.
 public  void setDocumentBase(URL docBase) 
    Sets the document base of the default context for this server.
 public  void setHostName(String host) 
    Sets the virtual host name of this server.
 public  void setPort(int port) 
    Sets the port number on which this server listens.
 public  void setServerInfo(String serverInfo) 
    Sets the server info string for this server. This string must be of the form / [()]