org.openanzo.server.notification
Class UpdateManager

java.lang.Object
  extended by org.openanzo.server.notification.UpdateManager

public class UpdateManager
extends java.lang.Object

UpdateManager processes update messages from the model service, and sends messages to registed notification clients

Author:
Matthew Roy (mory@us.ibm.com)

Constructor Summary
UpdateManager(ModelServiceApi api, java.util.Properties properties)
          Create UpdateManager for configuration properties
 
Method Summary
 void deregisterClient(java.lang.String userId, javax.jms.Destination destination)
          Deregister a destination from a UserId
 void handleTransactionMessage(javax.jms.Session session, javax.jms.BytesMessage message)
          Handler an update message from the model service
 void registerClient(java.lang.String userId, javax.jms.Destination destination, javax.jms.Session session)
          Register a User with its destination and a session
 void reset(javax.jms.Session session)
          Reset cache the cache of acls
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateManager

public UpdateManager(ModelServiceApi api,
                     java.util.Properties properties)
Create UpdateManager for configuration properties

Parameters:
api - ModelServiceApi to use
properties - Configuration properties
Method Detail

reset

public void reset(javax.jms.Session session)
           throws AnzoException
Reset cache the cache of acls

Parameters:
session - JMS Session
Throws:
AnzoException

registerClient

public void registerClient(java.lang.String userId,
                           javax.jms.Destination destination,
                           javax.jms.Session session)
                    throws AnzoException
Register a User with its destination and a session

Parameters:
userId - UserId for client
destination - Destination for client
session - Session for the destination
Throws:
AnzoException

deregisterClient

public void deregisterClient(java.lang.String userId,
                             javax.jms.Destination destination)
                      throws AnzoException
Deregister a destination from a UserId

Parameters:
userId - UserId for client
destination - Destination to deregister
Throws:
AnzoException

handleTransactionMessage

public void handleTransactionMessage(javax.jms.Session session,
                                     javax.jms.BytesMessage message)
                              throws AnzoException
Handler an update message from the model service

Parameters:
session - JMS session message came in over
message - JMS Message containing update message stream
Throws:
AnzoException


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