FileDocCategorySizeDatePackage
ServerFactory.javaAPI DocGlassfish v2 API3522Fri May 04 22:31:52 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: 1.3 $ $Date: 2007/05/05 05:31:51 $

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;