|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.repository.base.RepositoryWrapper
org.openrdf.repository.event.base.NotifyingRepositoryWrapper
public class NotifyingRepositoryWrapper
This notifying decorator allows listeners to register with the repository or connection and be notified when events occur.
NotifyingRepositoryConnectionWrapper| Constructor Summary | |
|---|---|
NotifyingRepositoryWrapper()
|
|
NotifyingRepositoryWrapper(Repository delegate)
|
|
NotifyingRepositoryWrapper(Repository delegate,
boolean defaultReportDeltas)
|
|
| Method Summary | |
|---|---|
void |
addRepositoryConnectionListener(RepositoryConnectionListener listener)
Registers a RepositoryConnectionListener that will receive notifications of operations that are performed on any< connections that are created by this repository. |
void |
addRepositoryListener(RepositoryListener listener)
Registers a RepositoryListener that will receive notifications of operations that are performed on this repository. |
NotifyingRepositoryConnection |
getConnection()
Opens a connection to this repository that can be used for querying and updating the contents of the repository. |
boolean |
getDefaultReportDeltas()
|
void |
initialize()
Initializes this repository. |
void |
removeRepositoryConnectionListener(RepositoryConnectionListener listener)
Removes a registered RepositoryConnectionListener from this repository. |
void |
removeRepositoryListener(RepositoryListener listener)
Removes a registered RepositoryListener from this repository. |
void |
setDataDir(File dataDir)
Set the directory where data and logging for this repository is stored. |
void |
setDefaultReportDeltas(boolean defaultReportDeltas)
|
void |
shutDown()
Shuts the repository down, releasing any resources that it keeps hold of. |
| Methods inherited from class org.openrdf.repository.base.RepositoryWrapper |
|---|
getDataDir, getDelegate, getValueFactory, isWritable, setDelegate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openrdf.repository.Repository |
|---|
getDataDir, getValueFactory, isWritable |
| Constructor Detail |
|---|
public NotifyingRepositoryWrapper()
public NotifyingRepositoryWrapper(Repository delegate)
public NotifyingRepositoryWrapper(Repository delegate,
boolean defaultReportDeltas)
| Method Detail |
|---|
public boolean getDefaultReportDeltas()
public void setDefaultReportDeltas(boolean defaultReportDeltas)
public void addRepositoryListener(RepositoryListener listener)
addRepositoryListener in interface NotifyingRepositorypublic void removeRepositoryListener(RepositoryListener listener)
removeRepositoryListener in interface NotifyingRepositorypublic void addRepositoryConnectionListener(RepositoryConnectionListener listener)
addRepositoryConnectionListener in interface NotifyingRepositorypublic void removeRepositoryConnectionListener(RepositoryConnectionListener listener)
removeRepositoryConnectionListener in interface NotifyingRepository
public NotifyingRepositoryConnection getConnection()
throws RepositoryException
Repository
Connection con = repository.getConnection();
try {
// perform operations on the connection
}
finally {
con.close();
}
getConnection in interface RepositorygetConnection in class RepositoryWrapperRepositoryException - If something went wrong during the creation of the Connection.
public void initialize()
throws RepositoryException
Repository
initialize in interface Repositoryinitialize in class RepositoryWrapperRepositoryException - If the initialization failed.public void setDataDir(File dataDir)
Repository
setDataDir in interface RepositorysetDataDir in class RepositoryWrapperdataDir - the directory where data for this repository is stored
public void shutDown()
throws RepositoryException
Repository
shutDown in interface RepositoryshutDown in class RepositoryWrapperRepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||