org.openanzo.atom
Class NotificationListener

java.lang.Object
  extended by org.openanzo.serialization.handlers.HandlerAdapter
      extended by org.openanzo.services.NotificationListenerAdapter
          extended by 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
           
 
Fields inherited from interface org.openanzo.services.INotificationListener
CONNECTED, CONNECTIONFAILED, DISCONNECTED
 
Constructor Summary
NotificationListener(INotificationService notificationService)
           
 
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.services.NotificationListenerAdapter
noticiationException
 
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
 

Field Detail

properties

public static java.util.Properties properties
Constructor Detail

NotificationListener

public NotificationListener(INotificationService notificationService)
Method Detail

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 deletion
namedGraphUri - URI of NamedGraph
metadataGraphUri - URI of NamedGraph's metadata graph
revision - Revision value of NamedGraph
aclUriTemplate - URI of ACL that this NamedGraph uses
createdBy - User that created the NamedGraph
modified - When graph was last modified
lastModifiedBy - Who last modified graph
Returns:
Message handled successfully
Throws:
AnzoException


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.