use of org.eclipse.rdf4j.repository.event.InterceptingRepositoryConnection in project rdf4j by eclipse.
the class InterceptingRepositoryWrapper method getConnection.
@Override
public InterceptingRepositoryConnection getConnection() throws RepositoryException {
RepositoryConnection conn = getDelegate().getConnection();
if (activated) {
boolean denied = false;
for (RepositoryInterceptor interceptor : interceptors) {
denied = interceptor.getConnection(getDelegate(), conn);
if (denied) {
break;
}
}
if (denied) {
conn = null;
}
}
if (conn == null)
return null;
InterceptingRepositoryConnection iconn = new InterceptingRepositoryConnectionWrapper(this, conn);
for (RepositoryConnectionInterceptor conInterceptor : conInterceptors) {
iconn.addRepositoryConnectionInterceptor(conInterceptor);
}
return iconn;
}
Aggregations