org.jboss.jca.adapters.mail.inflow
Class NewMsgsWorker

java.lang.Object
  extended by org.jboss.jca.adapters.mail.inflow.NewMsgsWorker
All Implemented Interfaces:
Runnable, EventListener, javax.resource.spi.work.Work, javax.resource.spi.work.WorkListener

public class NewMsgsWorker
extends Object
implements javax.resource.spi.work.Work, javax.resource.spi.work.WorkListener

Handles new messages

Author:
Scott Stark, Jesper Pedersen

Constructor Summary
NewMsgsWorker(javax.resource.spi.work.WorkManager mgr, Integer queueSize)
          Constructor
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewMsgsWorker

public NewMsgsWorker(javax.resource.spi.work.WorkManager mgr,
                     Integer queueSize)
Constructor

Parameters:
mgr - The work manager
queueSize - The queue size
Method Detail

watch

public void watch(MailActivation activation)
           throws InterruptedException
Watch an activation

Parameters:
activation - The activation
Throws:
InterruptedException - Thrown if the queue is interrupted

release

public void release()
Release

Specified by:
release in interface javax.resource.spi.work.Work

run

public void run()
Run

Specified by:
run in interface Runnable

workAccepted

public void workAccepted(javax.resource.spi.work.WorkEvent e)
Work accepted

Specified by:
workAccepted in interface javax.resource.spi.work.WorkListener
Parameters:
e - The event

workRejected

public void workRejected(javax.resource.spi.work.WorkEvent e)
Work rejected

Specified by:
workRejected in interface javax.resource.spi.work.WorkListener
Parameters:
e - The event

workStarted

public void workStarted(javax.resource.spi.work.WorkEvent e)
Work started

Specified by:
workStarted in interface javax.resource.spi.work.WorkListener
Parameters:
e - The event

workCompleted

public void workCompleted(javax.resource.spi.work.WorkEvent e)
Work completed

Specified by:
workCompleted in interface javax.resource.spi.work.WorkListener
Parameters:
e - The event


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)