public class MessageBus extends AbstractMessageAccessor implements MessageAppender
MessageAccessor.MessageFilter
Constructor and Description |
---|
MessageBus(String ownerId,
Message.Level threshold) |
Modifier and Type | Method and Description |
---|---|
protected Iterable<Message> |
allMessages()
Must return a (mutable) iterable that contains all messages (which are mutable) received
up till now.
|
MessageAppender |
append(MessageBuilder message)
Append a child to the underlying message.
|
void |
close()
Close the underlying message.
|
void |
listen(Consumer<Integer> callback)
Register a callback that is called whenever a new (top-level) message arrives, a message is
updated with descendant messages, or the progress of a message changes.
|
void |
unlisten(Consumer<Integer> callback) |
createFilter, getAll, getProgress
getDebugs, getErrors, getInfos, getTraces, getWarnings
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asLogger, getActiveBlock, getActiveBlock, getActiveBlockLogger
public MessageBus(String ownerId, Message.Level threshold)
ownerId
- A string that uniquely identifies this collection of messages. Could for
instance be the ID of a Pipeline job.public MessageAppender append(MessageBuilder message)
MessageAppender
append
in interface MessageAppender
public void close()
MessageAppender
close
in interface MessageAppender
protected Iterable<Message> allMessages()
AbstractMessageAccessor
allMessages
in class AbstractMessageAccessor
public void listen(Consumer<Integer> callback)
MessageAccessor
listen
in class MessageAccessor
public void unlisten(Consumer<Integer> callback)
unlisten
in class MessageAccessor
Copyright © 2010–2024 The DAISY Consortium. All rights reserved.