org.eclipse.datatools.connectivity
Class ManagedConnectionAdapter

java.lang.Object
  extended by org.eclipse.datatools.connectivity.ManagedConnectionAdapter
All Implemented Interfaces:
IManagedConnectionListener, IManagedConnectionOfflineListener

public class ManagedConnectionAdapter
extends java.lang.Object
implements IManagedConnectionOfflineListener

Base implementation for IManagedConnectionListener.

Author:
rcernich Created on Jan 23, 2006

Constructor Summary
ManagedConnectionAdapter()
           
 
Method Summary
 void aboutToAttach(ConnectEvent event)
          The "offline" connection manged by the associated IManagedConnection is about to be replaced with a "live" connection.
 void aboutToClose(ConnectEvent event)
          The connection manged by the associated IManagedConnection is about to be closed.
 void aboutToDetach(ConnectEvent event)
          The "live" connection manged by the associated IManagedConnection is about to be closed.
 void closed(ConnectEvent event)
          The connection manged by the associated IManagedConnection has been closed.
 void modified(ConnectEvent event)
          The connection manged by the associated IManagedConnection has been modifed.
 boolean okToClose(ConnectEvent event)
          A client (or the user) has requested the connection managed by the associated IManagedConnection be closed.
 boolean okToDetach(ConnectEvent event)
          A client (or the user) has requested the "live" connection managed by the associated IManagedConnection be closed, replaced with an offline version.
 void opened(ConnectEvent event)
          The connection managed by the associated IManagedConnection has been opened.
 void workingOffline(ConnectEvent event)
          The "live" connection manged by the associated IManagedConnection has been closed or the client (or user) has chosen to open a the connection in "offline" mode.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedConnectionAdapter

public ManagedConnectionAdapter()
Method Detail

opened

public void opened(ConnectEvent event)
Description copied from interface: IManagedConnectionListener
The connection managed by the associated IManagedConnection has been opened.

Specified by:
opened in interface IManagedConnectionListener

modified

public void modified(ConnectEvent event)
Description copied from interface: IManagedConnectionListener
The connection manged by the associated IManagedConnection has been modifed. The context object in the event may specify details as to what on the server has been modified.

Specified by:
modified in interface IManagedConnectionListener

okToClose

public boolean okToClose(ConnectEvent event)
Description copied from interface: IManagedConnectionListener
A client (or the user) has requested the connection managed by the associated IManagedConnection be closed. This callback gives other clients the option of cancelling the operation (e.g. they still require access to the connection).

Specified by:
okToClose in interface IManagedConnectionListener
Returns:
false to prevent the connection from being closed.

aboutToClose

public void aboutToClose(ConnectEvent event)
Description copied from interface: IManagedConnectionListener
The connection manged by the associated IManagedConnection is about to be closed. Clients may use this opportunity to perform clean up operations on the connection prior to it being closed. (Note, this method is called after okToClose() and prior to closed().)

Specified by:
aboutToClose in interface IManagedConnectionListener

closed

public void closed(ConnectEvent event)
Description copied from interface: IManagedConnectionListener
The connection manged by the associated IManagedConnection has been closed.

Specified by:
closed in interface IManagedConnectionListener

aboutToAttach

public void aboutToAttach(ConnectEvent event)
Description copied from interface: IManagedConnectionOfflineListener
The "offline" connection manged by the associated IManagedConnection is about to be replaced with a "live" connection. Clients may use this opportunity to perform any operations on the connection prior to it being opened. (Note, this method is called prior to attached().)

Specified by:
aboutToAttach in interface IManagedConnectionOfflineListener

aboutToDetach

public void aboutToDetach(ConnectEvent event)
Description copied from interface: IManagedConnectionOfflineListener
The "live" connection manged by the associated IManagedConnection is about to be closed. Clients may use this opportunity to perform clean up operations on the connection prior to it being closed. (Note, this method is called after okToDetach() and prior to workingOffline().)

Specified by:
aboutToDetach in interface IManagedConnectionOfflineListener

workingOffline

public void workingOffline(ConnectEvent event)
Description copied from interface: IManagedConnectionOfflineListener
The "live" connection manged by the associated IManagedConnection has been closed or the client (or user) has chosen to open a the connection in "offline" mode.

Specified by:
workingOffline in interface IManagedConnectionOfflineListener

okToDetach

public boolean okToDetach(ConnectEvent event)
Description copied from interface: IManagedConnectionOfflineListener
A client (or the user) has requested the "live" connection managed by the associated IManagedConnection be closed, replaced with an offline version. This callback gives other clients the option of cancelling the operation (e.g. they still require access to the "live" connection).

Specified by:
okToDetach in interface IManagedConnectionOfflineListener
Returns:
false to prevent the connection from being closed.


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