public class DefaultQueueHandler extends Object implements NotifdQueueHandler
PAUSE_PENDING, PAUSED, RESUME_PENDINGRUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED| Constructor and Description |
|---|
DefaultQueueHandler()
Constructor for DefaultQueueHandler.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Returns the name of this fiber.
|
int |
getStatus()
Returns the current status of the pausable fiber.
|
void |
pause()
Pauses a currently running fiber.
|
void |
processQueue()
processQueue
|
void |
resume()
Resumes the fiber if it is paused.
|
void |
run()
The main worker of the fiber.
|
void |
setInterval(String interval)
setInterval
|
void |
setNoticeQueue(NoticeQueue noticeQueue)
setNoticeQueue
|
void |
setQueueID(String queueID)
setQueueID
|
void |
start()
Starts the fiber.
|
void |
stop()
Stops a currently running fiber.
|
public DefaultQueueHandler()
Constructor for DefaultQueueHandler.
public void setQueueID(String queueID)
setQueueID
setQueueID in interface NotifdQueueHandlerqueueID - a String object.public void setNoticeQueue(NoticeQueue noticeQueue)
setNoticeQueue
setNoticeQueue in interface NotifdQueueHandlernoticeQueue - a NoticeQueue object.public void setInterval(String interval)
setInterval
setInterval in interface NotifdQueueHandlerinterval - a String object.public void run()
STOP_PENDING then the method will return as quickly as
possible.public void processQueue()
processQueue
processQueue in interface NotifdQueueHandlerpublic void start()
STARTING and will transition to
RUNNING
when the fiber finishes initializing and begins processing the
encapsulated queue.start in interface FiberIllegalStateException - Thrown if the fiber is stopped or has never run.public void stop()
stop in interface FiberIllegalStateException - Thrown if the fiber was never started.public void pause()
pause in interface PausableFiberIllegalStateException - Thrown if the fiber is stopped or has never run.public void resume()
resume in interface PausableFiberIllegalStateException - Thrown if the fiber is stopped or has never run.public String getName()
public int getStatus()
getStatus in interface FiberPausableFiber,
FiberCopyright © 2022. All rights reserved.