FileDocCategorySizeDatePackage
ServerFactory.javaAPI DocApache Tomcat 6.0.142437Fri Jul 20 04:20:32 BST 2007org.apache.catalina

ServerFactory

public class ServerFactory extends Object

ServerFactory allows the registration of the (singleton) Server instance for this JVM, so that it can be accessed independently of any existing reference to the component hierarchy. This is important for administration tools that are built around the internal component implementation classes.

author
Craig R. McClanahan
version
$Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $

Fields Summary
private static Server
server
The singleton Server instance for this JVM.
Constructors Summary
Methods Summary
public static ServergetServer()
Return the singleton Server instance for this JVM.



    // --------------------------------------------------------- Public Methods


                 
        
        if( server==null )
            server=new StandardServer();
        return (server);

    
public static voidsetServer(Server theServer)
Set the singleton Server instance for this JVM. This method must only be called from a constructor of the (singleton) Server instance that is created for this execution of Catalina.

param
theServer The new singleton instance


        if (server == null)
            server = theServer;