| Modifier and Type | Field and Description |
|---|---|
| protected boolean | handleMessageResult
result of handleMessage(..) for messages not accumulated (ignored) |
| protected final List | ignoring
kinds of messages to be ignored |
| protected IMessageHandler | interceptor
listener which can halt processing by returning true |
| protected final ArrayList | messages
messages accumulated |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MessageHandler(boolean
the result of handleMessage (i.e., if true, then only accumulate messages - stop processing accumulateOnly)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | clearMessages()
Implements org. |
| public void | dontIgnore(IMessage.
Implements org. |
| public IMessage[] | |
| public IMessage[] | Returns: IMessage[] of messages of the right kindthe IMessage.Kind expected, or null for all messages kind,if true, also get any greater than the target kind as determined by IMessage.Kind.COMPARATOR orGreater)Implements org. |
| public List | |
| public IMessage[] | |
| public boolean | Returns: true on interception or the constructor value otherwisethe IMessage to handle - never null message)Implements org. |
| public boolean | hasAnyMessage(final IMessage.
the IMessage.Kind to check for - accept any if null kind,if true, also any greater than the target kind as determined by IMessage.Kind.COMPARATOR orGreater)Implements org. |
| public void | ignore(IMessage.
Implements org. |
| public void | |
| public void | init(boolean
boolean value returned from handleMessage after accumulating in list accumulateOnly)Initialize this, removing any messages accumulated, kinds being ignored, or interceptor. |
| public boolean | Returns: true if this kind has been flagged to be ignored.Implements org. |
| public int | Returns: number of messages accumulated of a given kindthe IMessage.Kind expected, or null for all messages kind,if true, also any greater than the target kind as determined by IMessage.Kind.COMPARATOR orGreater)Implements org. |
| public void | setInterceptor(IMessageHandler
the IMessageHandler passed the message. Pass null to remove the old interceptor. interceptor)Set the interceptor which gets any message before we process it. |
| public String | Returns: String containing list of messagesOverrides java. |
| handleMessageResult | back to summary |
|---|---|
| protected boolean handleMessageResult result of handleMessage(..) for messages not accumulated (ignored) | |
| ignoring | back to summary |
|---|---|
| protected final List<IMessage. kinds of messages to be ignored | |
| interceptor | back to summary |
|---|---|
| protected IMessageHandler interceptor listener which can halt processing by returning true | |
| messages | back to summary |
|---|---|
| protected final ArrayList<IMessage> messages messages accumulated | |
| MessageHandler | back to summary |
|---|---|
| public MessageHandler() same as MessageHandler(false) | |
| MessageHandler | back to summary |
|---|---|
public MessageHandler(boolean accumulateOnly)
| |
| clearMessages | back to summary |
|---|---|
| public void clearMessages() Implements org. Clear the messages without changing other behavior. | |
| dontIgnore | back to summary |
|---|---|
| public void dontIgnore(IMessage. Implements org. Remove a message kind from the list of those ignored from now on. | |
| getErrors | back to summary |
|---|---|
public IMessage[] getErrors()
| |
| getMessages | back to summary |
|---|---|
| public IMessage[] getMessages(IMessage. Implements org. Get all messages or those of a specific kind. Pass null to get all kinds.
| |
| getUnmodifiableListView | back to summary |
|---|---|
| public List Implements org.
| |
| getWarnings | back to summary |
|---|---|
public IMessage[] getWarnings()
| |
| handleMessage | back to summary |
|---|---|
| public boolean handleMessage(IMessage message) Implements org. This implementation accumulates message. If an interceptor is installed and returns true (message handled), then processing halts and the message is not accumulated.
| |
| hasAnyMessage | back to summary |
|---|---|
| public boolean hasAnyMessage(final IMessage. Implements org. Doc from org. Tell whether this holder has any message of this kind (optionally or greater).
| |
| ignore | back to summary |
|---|---|
| public void ignore(IMessage. Implements org. Set a message kind to be ignored from now on | |
| init | back to summary |
|---|---|
| public void init() Initialize this, removing any messages accumulated, kinds being ignored, or interceptor. Assume that this should return false from handleMessage(..). | |
| init | back to summary |
|---|---|
| public void init(boolean accumulateOnly) Initialize this, removing any messages accumulated, kinds being ignored, or interceptor.
| |
| isIgnoring | back to summary |
|---|---|
| public boolean isIgnoring(IMessage. Implements org. Doc from org. Signal clients whether this will ignore messages of a given type. Clients may use this to avoid constructing or sending certain messages.
| |
| numMessages | back to summary |
|---|---|
| public int numMessages(IMessage. Implements org. Doc from org. Count the messages currently held by this holder. Pass null to get all kinds. | |
| setInterceptor | back to summary |
|---|---|
| public void setInterceptor(IMessageHandler interceptor) Set the interceptor which gets any message before we process it.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |