Class IMessageGenerator
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
rs.edu.raf.dsw.rudok.app.messagegenerator.IMessageGenerator
- Direct Known Subclasses:
StandardMessageGenerator
public abstract class IMessageGenerator extends IPublisher
Message generator
Used for generating messages propagated throughout the system, such as logs, warnings, errors, etc.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIMessageGenerator.MessageMessage wrapper forIMessageobserver data.static classIMessageGenerator.TypeMessage types. -
Constructor Summary
Constructors Constructor Description IMessageGenerator() -
Method Summary
Modifier and Type Method Description voiderror(String content)Produces an error message with the given content and the current timestamp.voidlog(String content)Produces a log message with the given content and the current timestamp.voidsend(String content, IMessageGenerator.Type type)Sends the message with the given content and type.abstract voidsend(String content, IMessageGenerator.Type type, String timestamp)Sends the message with the given content, type and timestamp.voidwarning(String content)Produces a warning message with the given content and the current timestamp.Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IPublisher
addObserver, getObservers, publish, removeObserver, setObserversMethods inherited from class rs.edu.raf.dsw.rudok.app.observer.IPublisherGlobal
addObserverGlobal, getObserversGlobal, removeObserverGlobalMethods inherited from class rs.edu.raf.dsw.rudok.app.observer.IObserver
addPublisher, getPublishers, receive, removePublisher, setPublishers
-
Constructor Details
-
IMessageGenerator
public IMessageGenerator()
-
-
Method Details
-
send
Sends the message with the given content, type and timestamp.- Parameters:
content- Message content.type- Message type.timestamp- Message timestamp.
-
send
Sends the message with the given content and type.- Parameters:
content- Message content.type- Message type.
-
log
Produces a log message with the given content and the current timestamp.- Parameters:
content- Message content.
-
warning
Produces a warning message with the given content and the current timestamp.- Parameters:
content- Message content.
-
error
Produces an error message with the given content and the current timestamp.- Parameters:
content- Message content.
-