Class IPublisher
java.lang.Object
rs.edu.raf.dsw.rudok.app.observer.IObserver
rs.edu.raf.dsw.rudok.app.observer.IPublisherGlobal
rs.edu.raf.dsw.rudok.app.observer.IPublisher
- Direct Known Subclasses:
ElementPainter
,IAddon
,IAddonManager
,IFileSystem
,IGui
,ILogger
,IMapNode
,IMessageGenerator
,StandardConfigHandler
public abstract class IPublisher extends IPublisherGlobal
Publisher for observer design pattern. Extends IObserver to allow for publisher-observer classes.
-
Constructor Summary
Constructors Constructor Description IPublisher()
-
Method Summary
Modifier and Type Method Description void
addObserver(IObserver observer)
Adds a new observer.Set<IObserver>
getObservers()
void
publish(IMessage message)
Updates all subscribed observers.void
removeObserver(IObserver observer)
Removes an observer.void
setObservers(Set<IObserver> observers)
Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IPublisherGlobal
addObserverGlobal, getObserversGlobal, removeObserverGlobal
Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IObserver
addPublisher, getPublishers, receive, removePublisher, setPublishers
-
Constructor Details
-
IPublisher
public IPublisher()
-
-
Method Details
-
getObservers
-
setObservers
-
publish
Updates all subscribed observers.- Parameters:
message
- Message.
-
addObserver
Adds a new observer.- Parameters:
observer
-
-
removeObserver
Removes an observer.- Parameters:
observer
-
-