org.eclipse.datatools.sqltools.core
Interface IControlConnectionManager


public interface IControlConnectionManager

This interface is for manage all control connections. You should get a refrence to this interface through: dmpplugin.getControlConnectionManager()

It's not intended to be implemented by clients.

Author:
Yang Liu, Hui Cao

Method Summary
 void addControlConnectionListener(IControlConnectionListener listener)
          Adds an IControlConnectionListener to receive the control connection update events
 IControlConnection getControlConnection(DatabaseIdentifier databaseIdentifier)
          Checks whether there is a controlconnection exists for the specified database identifier.
 IControlConnection[] getControlConnections()
          Retrieves all controlconnections registered in this control connection manager
 IControlConnection[] getControlConnections(java.lang.String profileName)
          Checks whether there are control connections exist for the specified connection profile.
 IControlConnection getOrCreateControlConnection(DatabaseIdentifier databaseIdentifier)
          Gets an controlconnection given the profile.
 boolean hasControlConnection()
          Whether there's registered control connection
 void removeControlConnectionListener(IControlConnectionListener listener)
          Removes an IControlConnectionListener from receiving the control connection update events
 void shutdown()
          Shuts down this control connection manager.
 

Method Detail

getOrCreateControlConnection

public IControlConnection getOrCreateControlConnection(DatabaseIdentifier databaseIdentifier)
                                                throws java.sql.SQLException,
                                                       NoSuchProfileException
Gets an controlconnection given the profile. If not exist, may create one.

Parameters:
databaseIdentifier - database identifier
Returns:
IControlConnection object keyed by databaseIdentifier
Throws:
java.sql.SQLException
NoSuchProfileException

getControlConnection

public IControlConnection getControlConnection(DatabaseIdentifier databaseIdentifier)
Checks whether there is a controlconnection exists for the specified database identifier. If yes, return the controlconnection, otherwise return null

Parameters:
databaseIdentifier - the database identifier
Returns:
the corresponding control connection

getControlConnections

public IControlConnection[] getControlConnections()
Retrieves all controlconnections registered in this control connection manager

Returns:
all registered control connections

getControlConnections

public IControlConnection[] getControlConnections(java.lang.String profileName)
Checks whether there are control connections exist for the specified connection profile. If yes, return the control connection array, otherwise return null

Parameters:
profileName - the connection profile name
Returns:
the corresponding control connections

addControlConnectionListener

public void addControlConnectionListener(IControlConnectionListener listener)
Adds an IControlConnectionListener to receive the control connection update events

Parameters:
listener - the event listener

removeControlConnectionListener

public void removeControlConnectionListener(IControlConnectionListener listener)
Removes an IControlConnectionListener from receiving the control connection update events

Parameters:
listener - the event listener

hasControlConnection

public boolean hasControlConnection()
Whether there's registered control connection

Returns:
true if so; false otherwize

shutdown

public void shutdown()
Shuts down this control connection manager. It will dispose all control connections



Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.