public class HouseKeeper
extends java.lang.Object
implements com.googlecode.fascinator.common.messaging.GenericListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Integer |
DEFAULT_TIMEOUT
Default timeout = 5 mins
|
static java.lang.String |
QUEUE_ID
House Keeping queue
|
| Constructor and Description |
|---|
HouseKeeper()
Constructor required by ServiceLoader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
confirmMessage(java.lang.String actionId)
Confirm and remove a message/action
|
java.lang.String |
getId()
Return the ID string for this listener
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getQueueStats()
Get the latest statistics on message queues.
|
java.util.List<UserAction> |
getUserMessages()
Get the messages to display for the user
|
void |
init(com.googlecode.fascinator.common.JsonSimpleConfig config)
Initialization method
|
void |
onMessage(javax.jms.Message message)
Callback function for incoming messages sent directly to housekeeping.
|
void |
run()
Start thread running
|
void |
setPriority(int newPriority)
Sets the priority level for the thread.
|
void |
start()
Start the queue
|
void |
stop()
Stop the House Keeper.
|
public static final java.lang.String QUEUE_ID
public static final java.lang.Integer DEFAULT_TIMEOUT
public HouseKeeper()
public void run()
run in interface java.lang.Runnablepublic void init(com.googlecode.fascinator.common.JsonSimpleConfig config)
throws java.lang.Exception
init in interface com.googlecode.fascinator.common.messaging.GenericListenerconfig - Configuration to usejava.lang.Exception - for any failurepublic java.lang.String getId()
getId in interface com.googlecode.fascinator.common.messaging.GenericListenerpublic void start()
throws java.lang.Exception
start in interface com.googlecode.fascinator.common.messaging.GenericListenerjava.lang.Exception - if an error occurred starting the JMS connectionspublic void stop()
throws java.lang.Exception
stop in interface com.googlecode.fascinator.common.messaging.GenericListenerjava.lang.Exceptionpublic void onMessage(javax.jms.Message message)
onMessage in interface javax.jms.MessageListenermessage - The incoming messagepublic java.util.List<UserAction> getUserMessages()
public void confirmMessage(java.lang.String actionId)
throws java.lang.Exception
actionId - The ID of the action to removejava.lang.Exceptionpublic void setPriority(int newPriority)
setPriority in interface com.googlecode.fascinator.common.messaging.GenericListenernewPriority - The priority level to set the thread atpublic java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getQueueStats()
Copyright © 2009-2019. All Rights Reserved.