Class InterceptingRepositoryWrapper
- java.lang.Object
-
- org.eclipse.rdf4j.repository.base.RepositoryWrapper
-
- org.eclipse.rdf4j.repository.event.base.InterceptingRepositoryWrapper
-
- All Implemented Interfaces:
DelegatingRepository,InterceptingRepository,Repository
public class InterceptingRepositoryWrapper extends RepositoryWrapper implements InterceptingRepository
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.- Author:
- Herko ter Horst
- See Also:
InterceptingRepositoryConnectionWrapper
-
-
Constructor Summary
Constructors Constructor Description InterceptingRepositoryWrapper()InterceptingRepositoryWrapper(Repository delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)Registers a RepositoryConnectionInterceptor that will receive notifications of operations that are performed on any connections that are created by this repository.voidaddRepositoryInterceptor(RepositoryInterceptor interceptor)Registers a RepositoryInterceptor that will receive notifications of operations that are performed on this repository.InterceptingRepositoryConnectiongetConnection()voidinit()voidremoveRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)Removes a registered RepositoryConnectionInterceptor from this repository.voidremoveRepositoryInterceptor(RepositoryInterceptor interceptor)Removes a registered RepositoryInterceptor from this repository.voidsetDataDir(File dataDir)voidshutDown()-
Methods inherited from class org.eclipse.rdf4j.repository.base.RepositoryWrapper
getDataDir, getDelegate, getValueFactory, isInitialized, isWritable, setDelegate, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.repository.Repository
getDataDir, getValueFactory, isInitialized, isWritable
-
-
-
-
Constructor Detail
-
InterceptingRepositoryWrapper
public InterceptingRepositoryWrapper()
-
InterceptingRepositoryWrapper
public InterceptingRepositoryWrapper(Repository delegate)
-
-
Method Detail
-
addRepositoryInterceptor
public void addRepositoryInterceptor(RepositoryInterceptor interceptor)
Registers a RepositoryInterceptor that will receive notifications of operations that are performed on this repository.- Specified by:
addRepositoryInterceptorin interfaceInterceptingRepository
-
removeRepositoryInterceptor
public void removeRepositoryInterceptor(RepositoryInterceptor interceptor)
Removes a registered RepositoryInterceptor from this repository.- Specified by:
removeRepositoryInterceptorin interfaceInterceptingRepository
-
addRepositoryConnectionInterceptor
public 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.- Specified by:
addRepositoryConnectionInterceptorin interfaceInterceptingRepository
-
removeRepositoryConnectionInterceptor
public void removeRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)
Removes a registered RepositoryConnectionInterceptor from this repository.- Specified by:
removeRepositoryConnectionInterceptorin interfaceInterceptingRepository
-
getConnection
public InterceptingRepositoryConnection getConnection() throws RepositoryException
- Specified by:
getConnectionin interfaceRepository- Overrides:
getConnectionin classRepositoryWrapper- Throws:
RepositoryException
-
init
public void init() throws RepositoryException- Specified by:
initin interfaceRepository- Overrides:
initin classRepositoryWrapper- Throws:
RepositoryException
-
setDataDir
public void setDataDir(File dataDir)
- Specified by:
setDataDirin interfaceRepository- Overrides:
setDataDirin classRepositoryWrapper
-
shutDown
public void shutDown() throws RepositoryException- Specified by:
shutDownin interfaceRepository- Overrides:
shutDownin classRepositoryWrapper- Throws:
RepositoryException
-
-