ToolManager.java revision 8af80418ba1ec431c8027fa9668e5678658d3611
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: ToolManager.java,v 1.1 2008/11/22 02:19:53 ak138937 Exp $
*
*/
/**
* This is a main controller for the whole application.
*/
public class ToolManager {
/** Creates a new instance of ToolManager */
private ToolManager() {
}
/**
* Creates a new instance of this class if one doesn't exist.
* This is implemented as a singlelton so that there is one
* manager for the application.
*/
public static ToolManager getInstance() {
return tManager;
}
synchronized (ToolManager.class) {
tManager = new ToolManager();
}
}
return tManager;
}
/**
* This method is responsible for initializing and setting up
* the application for start. It creates the tool service manager
* and tool context and initalizes the UIManager.
*/
public void initApplication() {
}
/**
* This actually starts the application by delegating control to
* the UIManager.
*/
public void runApplication() {
}
/**
* Returns the ToolContext that is managed by this
* ToolManager.
*
* @return <code>ToolContext</code> of the application.
*/
public ToolContext getToolContext() {
return tContext;
}
/**
* Returns the output writer manager that is managed by this
* ToolManager.
*
* @return <code>ToolOutputManager</code> of the application.
*/
public ToolOutputManager getToolOutputManager() {
return toolOutputManager;
}
}