org.openanzo.atom
Class NotificationListener
java.lang.Object
org.openanzo.serialization.handlers.HandlerAdapter
org.openanzo.services.NotificationListenerAdapter
org.openanzo.atom.NotificationListener
- All Implemented Interfaces:
- IRepositoryHandler, INotificationListener
public class NotificationListener
- extends NotificationListenerAdapter
Simple utility class that logs into the Anzo notification system and prints updates to named graphs.
- Author:
- bszekely
|
Field Summary |
static java.util.Properties |
properties
|
|
Method Summary |
void |
connectionStateChanged(int state)
Event about the state of the INotificationService's connection to the NotificationServer |
boolean |
handleNamedGraph(boolean addition,
org.openrdf.model.URI namedGraphUri,
org.openrdf.model.URI metadataGraphUri,
java.lang.Long revision,
org.openrdf.model.URI aclUriTemplate,
org.openrdf.model.URI createdBy,
java.lang.Long modified,
org.openrdf.model.URI lastModifiedBy)
Handle NamedGraph message |
| Methods inherited from class org.openanzo.serialization.handlers.HandlerAdapter |
handleAci, handleAcl, handleCommandEnd, handleCommandStart, handleEndDocument, handleError, handleNode, handleReset, handleRole, handleStartDocument, handleStatement, handleSubRoleOf, handleTransactionEnd, handleTransactionStart, handleUser, handleUserInRole |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openanzo.serialization.IRepositoryHandler |
handleAci, handleAcl, handleCommandEnd, handleCommandStart, handleEndDocument, handleError, handleNode, handleReset, handleRole, handleStartDocument, handleStatement, handleSubRoleOf, handleTransactionEnd, handleTransactionStart, handleUser, handleUserInRole |
properties
public static java.util.Properties properties
NotificationListener
public NotificationListener(INotificationService notificationService)
connectionStateChanged
public void connectionStateChanged(int state)
- Description copied from interface:
INotificationListener
- Event about the state of the INotificationService's connection to the NotificationServer
- Specified by:
connectionStateChanged in interface INotificationListener- Overrides:
connectionStateChanged in class NotificationListenerAdapter
- Parameters:
state - current state of the connection- See Also:
INotificationListener.CONNECTED,
INotificationListener.DISCONNECTED,
INotificationListener.CONNECTIONFAILED
handleNamedGraph
public boolean handleNamedGraph(boolean addition,
org.openrdf.model.URI namedGraphUri,
org.openrdf.model.URI metadataGraphUri,
java.lang.Long revision,
org.openrdf.model.URI aclUriTemplate,
org.openrdf.model.URI createdBy,
java.lang.Long modified,
org.openrdf.model.URI lastModifiedBy)
throws AnzoException
- Description copied from interface:
IRepositoryHandler
- Handle NamedGraph message
- Specified by:
handleNamedGraph in interface IRepositoryHandler- Overrides:
handleNamedGraph in class HandlerAdapter
- Parameters:
addition - Is this message an addition or deletionnamedGraphUri - URI of NamedGraphmetadataGraphUri - URI of NamedGraph's metadata graphrevision - Revision value of NamedGraphaclUriTemplate - URI of ACL that this NamedGraph usescreatedBy - User that created the NamedGraphmodified - When graph was last modifiedlastModifiedBy - Who last modified graph
- Returns:
- Message handled successfully
- Throws:
AnzoException
Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.