|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modelbus.core.lib.notification.NotificationListenerManager
public class NotificationListenerManager
The class manages the registration of notification listeners. ModelBus provides notifications about model creation, deletion and updating. It is
possible to define an own notification listener and to register it for a specified repository location. The listener has to implement the interface
INotificationListener
.
Method Summary | |
---|---|
void |
addNotificationListener(INotificationListener notificationListener)
Adds a specified notification listener, if it does not already exist in the listener list |
static NotificationListenerManager |
getNotificationListenerManager()
Returns an instance of a NotificationListenerManager for a specified repository location (for example "http://localhost:9191/modelbusrepository") |
NotificationLocationStatus |
getNotificationLocationStatus()
|
void |
notify(java.lang.String url,
java.lang.String mode,
java.lang.String username,
java.lang.String sessionID)
Notifies each registered notification listener about model creation, deletion or updating |
void |
notifyChangeModelNotificationListener(java.lang.String modelUri,
java.lang.String messageID,
java.lang.String changeModelContent)
Notifies each notification listener about the commit of a change set. |
void |
removeNotificationListener(INotificationListener notificationListener)
Removes a specified notification listener |
boolean |
startModelBusTopicListener()
|
boolean |
stopModelBusTopicListener()
|
void |
update(java.util.Observable o,
java.lang.Object arg)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static NotificationListenerManager getNotificationListenerManager()
repLocation
- the location of the repository
java.lang.Exception
public void addNotificationListener(INotificationListener notificationListener)
notificationListener
- public void removeNotificationListener(INotificationListener notificationListener)
notificationListener
- public void notify(java.lang.String url, java.lang.String mode, java.lang.String username, java.lang.String sessionID)
url
- the path of the model, which has changedmode
- the kind of change ("update", "delete", "create")username
- the name of the user who has changed the entrysessionID
- the ID of the user sessionpublic void notifyChangeModelNotificationListener(java.lang.String modelUri, java.lang.String messageID, java.lang.String changeModelContent)
modelUri
- should be empty (not used)messageID
- a unique identifierchangeModelContent
- a serialized EMF ChangeModelpublic boolean startModelBusTopicListener()
public boolean stopModelBusTopicListener() throws ModelBusException
ModelBusException
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
public NotificationLocationStatus getNotificationLocationStatus()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |