|
ProgramixGenericLib v5.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.programix.da2.bridge.DABridgeProxy
public class DABridgeProxy
This part of the Data Access Bridge system is a DASource that
converts requests to be sent to the DABridgeProcessor
supplied at construction.
NOTE: Neither
the init() method nor the
the shutdown() method are permitted to
be remotely.
Calling init() on any DA's retrieved from this proxy will result
in a DABridgeDAException being thrown.
Calling shutdown() on any DA's retrieved from this proxy will silently
do nothing.
| Constructor Summary | |
|---|---|
DABridgeProxy(DABridgeProcessor processor)
|
|
| Method Summary | ||
|---|---|---|
|
getDA(Class<T> daInterfaceType)
Searches for an implementation of the specified interface type. |
|
boolean |
isAvailable(Class<? extends GenericDA> daInterfaceType)
Searches for an implementation of the specified interface type and returns true if one is available. |
|
void |
shutdown()
This should be called when the DASource is no longer needed to clean up any potential resources being used behind the scenes. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DABridgeProxy(DABridgeProcessor processor)
throws DAException
DAException| Method Detail |
|---|
public <T extends GenericDA> T getDA(Class<T> daInterfaceType)
throws DAException
DASource
getDA in interface DASourcedaInterfaceType - the interface type for which an implementation
is desired.
DAException - if either no implementation can be
found or if there is trouble creating/accessing the implementation.
public boolean isAvailable(Class<? extends GenericDA> daInterfaceType)
throws DAException
DASourceDASource.getDA(Class)
with the same parameter is virtually guaranteed to succeed (barring
a communication breakdown, a call to shutdown,
or similar unforeseen problems).
isAvailable in interface DASourcedaInterfaceType - the interface type for which an implementation
is desired.
DAException - if a determination can not be made (perhaps
because of a communication error or other similar kinds of problems
that prevent a definitive answer from being found).public void shutdown()
DASourceIf 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.
shutdown in interface DASource
|
ProgramixGenericLib v5.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||