ProgramixGenericLib v4.0.0

com.programix.da2
Interface DASource

All Known Implementing Classes:
ConfigDASource, DABridgeProxy, DAStore

public interface DASource

A source of GenericDA implementations for either the entire VM or for an individual user.

Author:
Paul Hyde

Method Summary
 GenericDA getDA(Class daInterfaceType)
          Searches for an implementation of the specified interface type.
 void shutdown()
          This should be called when the DASource is no longer needed to clean up any potential resources being used behind the scenes.
 

Method Detail

getDA

GenericDA getDA(Class daInterfaceType)
                throws DAException
Searches for an implementation of the specified interface type.

Parameters:
daInterfaceType - the interface type for which an implementation is desired.
Returns:
an implementation of the specified type.
Throws:
DAException - if either no implementation can be found or if there is trouble creating/accessing the implementation.

shutdown

void shutdown()
This should be called when the DASource is no longer needed to clean up any potential resources being used behind the scenes. Some implementations may have nothing to do when shutdown, but other implementations might have important de-allocation duties to perform.

If there are any "cached" instances of GenericDA that this source is holding, those are individually shutdown by calling this method.

No other methods should be called after this method. Calling other methods after calling this method results in undefined behavior (many times, a ShutdownDAException will be thrown when attempting to invoke those other methods, but there is no requirement that all methods do this).

Calling shutdown() more than one time must be allowed and shutdown() must not complain. Also note that shutdown() never throws any exceptions—it just makes its best effort of close down everything. Implementations must assure that this remains true.


ProgramixGenericLib v4.0.0

Copyright © 2001-2007 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.