Package com.apelon.beans.dts.plugin.connection

Provides the classes and interfaces used in Connection Event notification.

See:
          Description

Interface Summary
ConnectionCloseVeto Veto a connection close.
DtsConnectionListener Defines the available Connection event methods that an interested class must implement for processing of Connection events.
 

Class Summary
DtsConnectionAdapter Provides a default 'do nothing' implementation for DtsConnectionListener methods.
DtsConnectionEvent Defines the available Connection events that an interested class may listen for.
VetoCloseDescriptor Contains the details that can be supplied with the veto against closing a connection.
 

Package com.apelon.beans.dts.plugin.connection Description

Provides the classes and interfaces used in Connection Event notification.

A DTS ServerConnection class provides the connection from the client to the server. The DTS Editor client creates a ServerConnection using one of the implmentations such as ServerConnectionJDBC or ServerConnectionSocket. The particular ServerConnection established is then passed into the createInstance methods of the service class like SearchServer, NavServer, NamespaceQuery and ConceptDefQuery. When connection events take place the DTS Editor notifies the plug-in so that it can take appropriate actions such as enabling/disabling it's menu items.

DtsConnectionListener defines the available Connection event methods that an interested class must implement for processing of Connection events. The methods defined by this interface must be implemented by any class required to perform an action when a Connection action occurs. connectionOpened(), connectionWillClose(), connectionClosing() and connectionClosed() all take an DtsConnectionEvent object and need to be implemented with the appropriate actions to be taken upon the various events. DtsConnectionEvent includes Static eventType options like CONNECTION_OPEN and CONNECTION_CLOSE that can be used to check for the type of event occurring.

The plug-in may want to check with the user before closing a connection and give them a 'veto' against the close. The details that can be supplied with the veto are contained in VetoCloseDescriptor. Calling VetoCloseDescriptor() creates the veto details. These details are used by the application to determine whether to continue with the connection close. For example, DTSEditor uses this information in the confirmation dialog to get user input about connection close.

DtsConnectionAdapter provides a default 'do nothing' implementation for DtsConnectionListener methods. These include connectionOpened(), connectionWillClose(), connectionClosing() and connectionClosed() which all take DtsConnectionEvent.

Package Specification

Also see the dts connection beans package com.apelon.beans.dts.connect

Related Documentation

For overviews, tutorials, examples, guides, and additional documentation, please see:



Copyright © 2011. All Rights Reserved.