org.eclipse.datatools.sqltools.debugger.core
Class DebugHandlerManager

java.lang.Object
  extended by org.eclipse.datatools.sqltools.debugger.core.DebugHandlerManager
All Implemented Interfaces:
org.eclipse.datatools.sqltools.core.profile.ISQLToolsProfileListener, IDebugHandlerManager, ISQLToolsConnectListener

public class DebugHandlerManager
extends java.lang.Object
implements IDebugHandlerManager, org.eclipse.datatools.sqltools.core.profile.ISQLToolsProfileListener, ISQLToolsConnectListener

Used to manage all debug handlers: creation, destroy

Author:
Idull

Constructor Summary
DebugHandlerManager()
           
 
Method Summary
 void aboutToClose(ConnectEvent event)
          The profile is about to close
 void closeConnection(ConnectEvent event)
          The profile is to be disconnected
 void dispose()
          Disposes all debug handlers in this manager
 IDebugHandler[] getDebugHandler(org.eclipse.datatools.sqltools.core.ServerIdentifier serverIdentifier)
          Returns the debug handler for the given server
 IDebugHandler getDebugHandler(java.lang.String profileName)
          Returns the debug handler for the given profile, may return null if there is no debug handler for this profile
 IDebugHandler[] getDebugHandlers()
          Returns all debug handlers
 IDebugHandler getOrCreateDebugHandler(java.lang.String profileName)
          Returns or creates the debug handler for the given profile.
 org.eclipse.datatools.sqltools.core.ServerIdentifier[] getServerIdentifiers()
          Returns all server ids which are connected
 boolean okToClose(ConnectEvent event)
          Asks if the profile can be closed currently
 void profileAdded(IConnectionProfile profile)
           
 void profileChanged(IConnectionProfile profile)
           
 void profileChanged(IConnectionProfile profile, java.lang.String oldName, java.lang.String oldDesc, java.lang.Boolean oldAutoConnect, boolean onlyNameChanged, org.eclipse.datatools.sqltools.core.profile.ConnectProfile oldProfile)
           
 void profileConnected(ConnectEvent event)
          The profile is connected.
 void profileDeleted(IConnectionProfile profile)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugHandlerManager

public DebugHandlerManager()
Method Detail

getOrCreateDebugHandler

public IDebugHandler getOrCreateDebugHandler(java.lang.String profileName)
Description copied from interface: IDebugHandlerManager
Returns or creates the debug handler for the given profile.

Specified by:
getOrCreateDebugHandler in interface IDebugHandlerManager

dispose

public void dispose()
Description copied from interface: IDebugHandlerManager
Disposes all debug handlers in this manager

Specified by:
dispose in interface IDebugHandlerManager

okToClose

public boolean okToClose(ConnectEvent event)
Description copied from interface: ISQLToolsConnectListener
Asks if the profile can be closed currently

Specified by:
okToClose in interface ISQLToolsConnectListener
Parameters:
event - the connect event
Returns:
if the profile can be close, otherwise

aboutToClose

public void aboutToClose(ConnectEvent event)
Description copied from interface: ISQLToolsConnectListener
The profile is about to close

Specified by:
aboutToClose in interface ISQLToolsConnectListener
Parameters:
event - the connect event

profileConnected

public void profileConnected(ConnectEvent event)
Description copied from interface: ISQLToolsConnectListener
The profile is connected. There is no guarantee that all components (which depend on connectivity) are successfully connected

Specified by:
profileConnected in interface ISQLToolsConnectListener
Parameters:
event - the connect event

closeConnection

public void closeConnection(ConnectEvent event)
Description copied from interface: ISQLToolsConnectListener
The profile is to be disconnected

Specified by:
closeConnection in interface ISQLToolsConnectListener
Parameters:
event - the connect event

profileChanged

public void profileChanged(IConnectionProfile profile,
                           java.lang.String oldName,
                           java.lang.String oldDesc,
                           java.lang.Boolean oldAutoConnect,
                           boolean onlyNameChanged,
                           org.eclipse.datatools.sqltools.core.profile.ConnectProfile oldProfile)
Specified by:
profileChanged in interface org.eclipse.datatools.sqltools.core.profile.ISQLToolsProfileListener

profileAdded

public void profileAdded(IConnectionProfile profile)
Specified by:
profileAdded in interface org.eclipse.datatools.sqltools.core.profile.ISQLToolsProfileListener

profileDeleted

public void profileDeleted(IConnectionProfile profile)
Specified by:
profileDeleted in interface org.eclipse.datatools.sqltools.core.profile.ISQLToolsProfileListener

profileChanged

public void profileChanged(IConnectionProfile profile)

getDebugHandler

public IDebugHandler[] getDebugHandler(org.eclipse.datatools.sqltools.core.ServerIdentifier serverIdentifier)
Description copied from interface: IDebugHandlerManager
Returns the debug handler for the given server

Specified by:
getDebugHandler in interface IDebugHandlerManager
Returns:

getDebugHandlers

public IDebugHandler[] getDebugHandlers()
Description copied from interface: IDebugHandlerManager
Returns all debug handlers

Specified by:
getDebugHandlers in interface IDebugHandlerManager
Returns:

getDebugHandler

public IDebugHandler getDebugHandler(java.lang.String profileName)
Description copied from interface: IDebugHandlerManager
Returns the debug handler for the given profile, may return null if there is no debug handler for this profile

Specified by:
getDebugHandler in interface IDebugHandlerManager
Returns:

getServerIdentifiers

public org.eclipse.datatools.sqltools.core.ServerIdentifier[] getServerIdentifiers()
Description copied from interface: IDebugHandlerManager
Returns all server ids which are connected

Specified by:
getServerIdentifiers in interface IDebugHandlerManager
Returns: