Class IObserver
java.lang.Object
rs.edu.raf.dsw.rudok.app.observer.IObserver
- Direct Known Subclasses:
IPublisherGlobal
,MapTree
public abstract class IObserver extends Object
Observer from observer design pattern.
-
Constructor Summary
Constructors Constructor Description IObserver()
-
Method Summary
Modifier and Type Method Description void
addPublisher(IPublisher publisher)
Adds a new publisher.Set<IPublisher>
getPublishers()
void
receive(Object message)
Receive data update from publisher.void
removePublisher(IPublisher publisher)
Removes a publisher.void
setPublishers(Set<IPublisher> publishers)
-
Constructor Details
-
IObserver
public IObserver()
-
-
Method Details
-
getPublishers
-
setPublishers
-
receive
Receive data update from publisher. Default implementation, should be overridden.- Parameters:
message
- Data sent by publisher.
-
addPublisher
Adds a new publisher.- Parameters:
publisher
-
-
removePublisher
Removes a publisher.- Parameters:
publisher
-
-