| Modifier | Constructor and Description |
|---|---|
protected |
AdvisoryGroup(Object key) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(Advisory.AdvisoryMessage message)
Adds an AdvisoryMessage to this AdvisoryGroup.
|
Set<Thread> |
getGroupThreads()
Returns the Set of Threads linked to this AdvisoryGroup.
Warning: modifying this Set directly will affect the workings of the Advisory and is NOT recommended. |
protected Object |
getKey()
Getter for AdvisoryGroup key
|
List<Advisory.AdvisoryMessage> |
getMessages()
Returns the List of AdvisoryMessages for this AdvisoryGroup.
Warning: modifying this List directly will affect the workings of the Advisory and is NOT recommended. |
boolean |
isLinkedTo(Thread thread)
Checks if this AdvisoryGroup is linked to the provided Thread.
|
void |
linkToThread(Thread thread)
Links the provided Thread to this AdvisoryGroup.
|
void |
unlinkThread(Thread thread)
Unlinks provided Thread from this AdvisoryGroup
|
protected AdvisoryGroup(Object key)
public void linkToThread(Thread thread)
thread - Thread to link to this AdvisoryGroupRuntimeException - if the provided Thread is already linked to another AdvisoryGroupprotected Object getKey()
public void unlinkThread(Thread thread)
thread - Thread to unlinkpublic void addMessage(Advisory.AdvisoryMessage message)
message - AdvisoryMessage to add to this AdvisoryGrouppublic boolean isLinkedTo(Thread thread)
thread - Thread to checkpublic List<Advisory.AdvisoryMessage> getMessages()
Copyright © 2021. All rights reserved.