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 class
IMessageGenerator.Message
Message wrapper forIMessage
observer data.static class
IMessageGenerator.Type
Message types. -
Constructor Summary
Constructors Constructor Description IMessageGenerator()
-
Method Summary
Modifier and Type Method Description void
error(String content)
Produces an error message with the given content and the current timestamp.void
log(String content)
Produces a log message with the given content and the current timestamp.void
send(String content, IMessageGenerator.Type type)
Sends the message with the given content and type.abstract void
send(String content, IMessageGenerator.Type type, String timestamp)
Sends the message with the given content, type and timestamp.void
warning(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, setObservers
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
-
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.
-