public interface CasaObservable
CasaObservable
represents an object that can be "observed". Typically,
an observed object will notify its observers when certain events occur. These
events can be filtered to notify an observer for only a specific subset of
events.
Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Observer
,
CasaObservableObject
Modifier and Type | Method and Description |
---|---|
void |
addObserver(Observer o,
String... notifyTypes) |
void |
addObserver(URLDescriptor observer,
String... notifyTypes) |
int |
countObservers() |
void |
deleteObserver(Observer o) |
void |
deleteObserver(URLDescriptor observer) |
void |
deleteObservers() |
boolean |
hasChanged() |
void |
notifyObservers() |
void |
notifyObservers(String eventType,
Object argument) |
void |
notifyObserversWithNoArg(String notifyType)
Notify with no arguments
|
void |
notifyObserversWithTop(Object arg)
TOP is the notification type
|
void addObserver(URLDescriptor observer, String... notifyTypes)
int countObservers()
void deleteObserver(Observer o)
void deleteObserver(URLDescriptor observer)
void deleteObservers()
boolean hasChanged()
void notifyObservers()
void notifyObserversWithTop(Object arg)
arg
- the argument to usevoid notifyObserversWithNoArg(String notifyType)
notifyType
- the notification type to use