|
||||||||||
| 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.InterceptingRepositoryWrapper
public class InterceptingRepositoryWrapper
Wrapper that notifies interceptors of events on Repositories before they happen. Any interceptor can block the operation by returning true from the relevant notification method. To do so will also cause the notification process to stop, i.e. no other interceptors will be notified. The order in which interceptors are notified is unspecified.
InterceptingRepositoryConnectionWrapper| Constructor Summary | |
|---|---|
InterceptingRepositoryWrapper()
|
|
InterceptingRepositoryWrapper(Repository delegate)
|
|
| Method Summary | |
|---|---|
void |
addRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)
Registers a RepositoryConnectionInterceptor that will receive notifications of operations that are performed on any connections that are created by this repository. |
void |
addRepositoryInterceptor(RepositoryInterceptor interceptor)
Registers a RepositoryInterceptor that will receive notifications of operations that are performed on this repository. |
InterceptingRepositoryConnection |
getConnection()
Opens a connection to this repository that can be used for querying and updating the contents of the repository. |
void |
initialize()
Initializes this repository. |
void |
removeRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)
Removes a registered RepositoryConnectionInterceptor from this repository. |
void |
removeRepositoryInterceptor(RepositoryInterceptor interceptor)
Removes a registered RepositoryInterceptor from this repository. |
void |
setDataDir(File dataDir)
Set the directory where data and logging for this repository is stored. |
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 InterceptingRepositoryWrapper()
public InterceptingRepositoryWrapper(Repository delegate)
| Method Detail |
|---|
public void addRepositoryInterceptor(RepositoryInterceptor interceptor)
addRepositoryInterceptor in interface InterceptingRepositorypublic void removeRepositoryInterceptor(RepositoryInterceptor interceptor)
removeRepositoryInterceptor in interface InterceptingRepositorypublic void addRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)
addRepositoryConnectionInterceptor in interface InterceptingRepositorypublic void removeRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)
removeRepositoryConnectionInterceptor in interface InterceptingRepository
public InterceptingRepositoryConnection 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 | |||||||||