org.eclipse.datatools.sqltools.plan.internal.core
Class PlanManager

java.lang.Object
  extended by org.eclipse.datatools.sqltools.plan.internal.core.PlanManager
All Implemented Interfaces:
IPlanManager

public class PlanManager
extends java.lang.Object
implements IPlanManager

Implementation of IPlanManager

Author:
Hui Cao

Constructor Summary
PlanManager()
          Constructor
 
Method Summary
 void addPlanManagerListener(IPlanManagerListener listener)
          Adds listener
 IPlanInstance createNewPlanInstance(PlanRequest request)
          Creates a new plan instance
 void fireFinish(IPlanInstance instance)
          Fires all the listeners of the plan finish event
 IPlanInstance[] getAllPlanInstances()
          Returns all currently available plan instances
 IPlanInstance getPlanInstance(PlanRequest request)
          Returns the plan instance identified by given plan request
 void removeAllFinished()
          Removes all finished plan instances
 void removePlanInstance(IPlanInstance instance)
          Removes the specified plan instance
 void removePlanManagerListener(IPlanManagerListener listener)
          Removes listener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanManager

public PlanManager()
Constructor

Method Detail

addPlanManagerListener

public void addPlanManagerListener(IPlanManagerListener listener)
Description copied from interface: IPlanManager
Adds listener

Specified by:
addPlanManagerListener in interface IPlanManager
Parameters:
listener - a listener

createNewPlanInstance

public IPlanInstance createNewPlanInstance(PlanRequest request)
Description copied from interface: IPlanManager
Creates a new plan instance

Specified by:
createNewPlanInstance in interface IPlanManager
Parameters:
request - the given plan request
Returns:
a new plan instance

fireFinish

public void fireFinish(IPlanInstance instance)
Fires all the listeners of the plan finish event

Parameters:
instance - the plan instance

getAllPlanInstances

public IPlanInstance[] getAllPlanInstances()
Description copied from interface: IPlanManager
Returns all currently available plan instances

Specified by:
getAllPlanInstances in interface IPlanManager
Returns:
all available plan instances

removeAllFinished

public void removeAllFinished()
Description copied from interface: IPlanManager
Removes all finished plan instances

Specified by:
removeAllFinished in interface IPlanManager

removePlanInstance

public void removePlanInstance(IPlanInstance instance)
Description copied from interface: IPlanManager
Removes the specified plan instance

Specified by:
removePlanInstance in interface IPlanManager
Parameters:
instance - the specified plan instance

removePlanManagerListener

public void removePlanManagerListener(IPlanManagerListener listener)
Description copied from interface: IPlanManager
Removes listener

Specified by:
removePlanManagerListener in interface IPlanManager
Parameters:
listener - a listener

getPlanInstance

public IPlanInstance getPlanInstance(PlanRequest request)
Description copied from interface: IPlanManager
Returns the plan instance identified by given plan request

Specified by:
getPlanInstance in interface IPlanManager
Returns:
the plan instance identified by given plan request