public abstract class AbstractDBResourceBlocker extends AbstractResource implements DBResource
lock, multiResourcelock| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDBResourceBlocker(DBResourceParameters parameters)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Establish connection to data base
|
protected abstract void |
connectToDB()
|
protected boolean |
equals(Comparable v1,
Comparable v2) |
Object |
get()
Return a connection to the data base.
|
Object |
getConnection()
Return a connection to the data base.
|
protected abstract Object |
getTheConnection()
final implementation method to get a connection to data base
Called from connect()This method is called with the connection establish |
boolean |
isThis(ResourceParameters parameters)
Check if parameters is the same for this resource.
|
addConsumer, addObserver, addObservers, closeRequest, deleteObserver, deleteObservers, execute, executeBegins, executeEnds, getConsumerAt, getConsumersCount, getData, getLastTimeOpen, getLastTimeUsed, getName, getParameters, inUse, isOpen, notifyChanges, notifyClose, notifyDispose, notifyObserver, notifyOpen, openCount, performExecution, prepare, prepare, removeConsumer, setData, updateLastTimeOpen, updateLastTimeUsedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisConnectedaddConsumer, closeRequest, execute, getConsumersCount, getData, getLastTimeOpen, getLastTimeUsed, getName, getParameters, inUse, isOpen, openCount, removeConsumer, setDataprotected AbstractDBResourceBlocker(DBResourceParameters parameters) throws InitializeException
parameters - InitializeExceptionpublic Object get() throws AccessResourceException
get in interface Resourceget in class AbstractResourceAccessResourceException - if there is an error while accessing the resourcepublic Object getConnection() throws AccessResourceException
AccessResourceExceptionget()public final void connect()
throws DataException
DataExceptionpublic boolean isThis(ResourceParameters parameters) throws ResourceException
isThis in interface ResourceProviderResourceExceptionResourceProvider.isThis(ResourceParameters)protected boolean equals(Comparable v1, Comparable v2)
protected abstract void connectToDB()
throws DataException
DataExceptionprotected abstract Object getTheConnection() throws DataException
connect()DataException