Class LoggingRDFServiceFactory
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.rdfservice.impl.logging.LoggingRDFServiceFactory
-
- All Implemented Interfaces:
RDFServiceFactory
public class LoggingRDFServiceFactory extends Object implements RDFServiceFactory
If the RDFServiceFactory is wrapped in this, then all RDFServices will be wrapped in a LoggingRDFService.
-
-
Constructor Summary
Constructors Constructor Description LoggingRDFServiceFactory(RDFServiceFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RDFServicegetRDFService()RDFServicegetShortTermRDFService()Returns an instance of RDFService that may not support being left idle for long periods of time.voidregisterJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener)Registers a Jena ModelChangedListener to listen to changes in any graph in the RDF store.voidregisterListener(ChangeListener changeListener)Registers a listener to listen to changes in any graph in the RDF store.StringtoString()voidunregisterJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener)Unregisters a Jena ModelChangedListener from listening to changes in the RDF store.voidunregisterListener(ChangeListener changeListener)Unregisters a listener from listening to changes in the RDF store.
-
-
-
Constructor Detail
-
LoggingRDFServiceFactory
public LoggingRDFServiceFactory(RDFServiceFactory factory)
-
-
Method Detail
-
getRDFService
public RDFService getRDFService()
- Specified by:
getRDFServicein interfaceRDFServiceFactory- Returns:
- RDFService - an RDFService instance
-
getShortTermRDFService
public RDFService getShortTermRDFService()
Description copied from interface:RDFServiceFactoryReturns an instance of RDFService that may not support being left idle for long periods of time. RDFService instances returned by this method should be immediately used and closed, not stored in (for example) session or context attributes. This method exists to enable performance improvements resulting from a lack of need to handle database connection or other service timeouts and reconnects. The results provided by RDFService instances returned by this method must be identical to those provided by instances returned by getRDFService().- Specified by:
getShortTermRDFServicein interfaceRDFServiceFactory- Returns:
- RDFService - an RDFService instance
-
registerListener
public void registerListener(ChangeListener changeListener) throws RDFServiceException
Description copied from interface:RDFServiceFactoryRegisters a listener to listen to changes in any graph in the RDF store. Any RDFService objects returned by this factory should notify this listener of changes.- Specified by:
registerListenerin interfaceRDFServiceFactory- Parameters:
changeListener- - the change listener- Throws:
RDFServiceException
-
unregisterListener
public void unregisterListener(ChangeListener changeListener) throws RDFServiceException
Description copied from interface:RDFServiceFactoryUnregisters a listener from listening to changes in the RDF store. Any RDFService objects returned by this factory should no longer notify this listener of changes.- Specified by:
unregisterListenerin interfaceRDFServiceFactory- Parameters:
changeListener- - the change listener- Throws:
RDFServiceException
-
registerJenaModelChangedListener
public void registerJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener) throws RDFServiceExceptionDescription copied from interface:RDFServiceFactoryRegisters a Jena ModelChangedListener to listen to changes in any graph in the RDF store. Any RDFService objects returned by this factory should notify this listener of changes.- Specified by:
registerJenaModelChangedListenerin interfaceRDFServiceFactory- Parameters:
changeListener- - the change listener- Throws:
RDFServiceException
-
unregisterJenaModelChangedListener
public void unregisterJenaModelChangedListener(org.apache.jena.rdf.model.ModelChangedListener changeListener) throws RDFServiceExceptionDescription copied from interface:RDFServiceFactoryUnregisters a Jena ModelChangedListener from listening to changes in the RDF store. Any RDFService objects returned by this factory should no longer notify this listener of changes.- Specified by:
unregisterJenaModelChangedListenerin interfaceRDFServiceFactory- Parameters:
changeListener- - the change listener- Throws:
RDFServiceException
-
-