|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MultiObservable
Interface for observable objects.
Observable object represents mutable 'data' in the model-view
paradigm. Each time an observable object is changed, it calls
update(this, argument)
for every registered observer
agent (in an unspecified order), where argument
describes the occurred changes (as it must be specified for a
particular object).
Notifiable
,
ObservedCore
Method Summary | |
---|---|
void |
addObserver(Notifiable agent)
Registers one more observer. |
void |
removeObserver(Notifiable agent)
Unregisters a particular observer. |
Method Detail |
---|
void addObserver(Notifiable agent) throws java.lang.NullPointerException
this
observable object
is changed somehow. Duplicate agents are not added (registered).
If an exception is thrown then state of this
object
is not changed. Important notes: registered observers should not
be accessible for other objects.
agent
- the observer agent (must be non-null
) to be
registered.
java.lang.NullPointerException
- if agent is null
.
java.lang.OutOfMemoryError
- if there is not enough memory.removeObserver(net.sf.ivmaidns.util.Notifiable)
void removeObserver(Notifiable agent)
null
)
then nothing is performed. Else the specified agent is removed
from the observers list of this
observable object
(this action is just the opposite to the agent registration).
agent
- the observer agent (may be null
) to be unregistered.addObserver(net.sf.ivmaidns.util.Notifiable)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |