public class NewMsgsWorker
extends java.lang.Object
implements javax.resource.spi.work.Work, javax.resource.spi.work.WorkListener
Constructor and Description |
---|
NewMsgsWorker(javax.resource.spi.work.WorkManager mgr,
java.lang.Integer queueSize)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
release()
Release
|
void |
run()
Run
|
void |
watch(MailActivation activation)
Watch an activation
|
void |
workAccepted(javax.resource.spi.work.WorkEvent e)
Work accepted
|
void |
workCompleted(javax.resource.spi.work.WorkEvent e)
Work completed
|
void |
workRejected(javax.resource.spi.work.WorkEvent e)
Work rejected
|
void |
workStarted(javax.resource.spi.work.WorkEvent e)
Work started
|
public NewMsgsWorker(javax.resource.spi.work.WorkManager mgr, java.lang.Integer queueSize)
mgr
- The work managerqueueSize
- The queue sizepublic void watch(MailActivation activation) throws java.lang.InterruptedException
activation
- The activationjava.lang.InterruptedException
- Thrown if the queue is interruptedpublic void release()
release
in interface javax.resource.spi.work.Work
public void run()
run
in interface java.lang.Runnable
public void workAccepted(javax.resource.spi.work.WorkEvent e)
workAccepted
in interface javax.resource.spi.work.WorkListener
e
- The eventpublic void workRejected(javax.resource.spi.work.WorkEvent e)
workRejected
in interface javax.resource.spi.work.WorkListener
e
- The eventpublic void workStarted(javax.resource.spi.work.WorkEvent e)
workStarted
in interface javax.resource.spi.work.WorkListener
e
- The eventpublic void workCompleted(javax.resource.spi.work.WorkEvent e)
workCompleted
in interface javax.resource.spi.work.WorkListener
e
- The eventCopyright ? 2010 Red Hat Middleware LLC (http://www.jboss.com/)