org.openanzo.services
Interface INotificationService

All Superinterfaces:
IService
All Known Implementing Classes:
EmbeddedNotificationService, JMSNotificationService

public interface INotificationService
extends IService

INotificationService provides an endpoint that Anzo notification operations are run against.

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Method Summary
 void connect()
          Connect to the Notification Server
 void disconnect()
          Disconnect from the Notification Server
 boolean isConnected()
          Determine if the INotificationService is connected to the Notification Server
 boolean isNotificationEnabled()
          Determine if if notification is enabled
 void registerNotificationListener(INotificationListener listener)
          Register an INotificationListener with service
 void registerSelector(java.lang.String selector)
          Register a message selector with NotificationServer
 void setUsingNotification(boolean enableNotification)
          Enable or disable notification
 void unregisterNotificationListener(INotificationListener listener)
          Unregister an INotificationListener with service
 void unregisterSelector(java.lang.String selector)
          Unregister a message selector from NotificationServer
 
Methods inherited from interface org.openanzo.services.IService
getServicePassword, getServiceUser, setServicePassword, setServiceUser
 

Method Detail

connect

void connect()
             throws NotificationException
Connect to the Notification Server

Throws:
NotificationException - if there was an error connecting to the Notification Server

disconnect

void disconnect()
                throws NotificationException
Disconnect from the Notification Server

Throws:
NotificationException - if there was an error disconnecting to the Notification Server

isConnected

boolean isConnected()
Determine if the INotificationService is connected to the Notification Server

Returns:
true if the INotificationService is connected to the Notification Server

isNotificationEnabled

boolean isNotificationEnabled()
Determine if if notification is enabled

Returns:
true if notification is enabled

registerSelector

void registerSelector(java.lang.String selector)
                      throws NotificationException
Register a message selector with NotificationServer

Parameters:
selector - Message selector to register
Throws:
NotificationException - if there was an error registering selector with the server

unregisterSelector

void unregisterSelector(java.lang.String selector)
                        throws NotificationException
Unregister a message selector from NotificationServer

Parameters:
selector - Message selector to unregister
Throws:
NotificationException - if there was an error unregistering selector from the server

setUsingNotification

void setUsingNotification(boolean enableNotification)
                          throws NotificationException
Enable or disable notification

Parameters:
enableNotification - state to set notification service
Throws:
NotificationException - if enabling or disabling notification fails

registerNotificationListener

void registerNotificationListener(INotificationListener listener)
Register an INotificationListener with service

Parameters:
listener - to register

unregisterNotificationListener

void unregisterNotificationListener(INotificationListener listener)
Unregister an INotificationListener with service

Parameters:
listener - to unregister


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