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

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

public class MailActivation
extends Object
implements Comparable, javax.resource.spi.work.Work

The MailActivation encapsulates a MailResourceAdapter#endpointActivation

Author:
Scott Stark, Jesper Pedersen

Field Summary
protected  javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory
          The message endpoint factory
static Method ON_MESSAGE
          The MailListener.onMessage method
protected  MailActivationSpec spec
          The activation spec for the mail folder
 
Constructor Summary
MailActivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, MailActivationSpec spec)
          Constructor
 
Method Summary
 int compareTo(Object obj)
          
 long getNextNewMsgCheckTime()
          Get the next message check time
 boolean isReleased()
          Is the activation released ?
 void release()
          Release the activation
 void run()
          
 void updateNextNewMsgCheckTime(long now)
          Update the next message check time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ON_MESSAGE

public static final Method ON_MESSAGE
The MailListener.onMessage method


spec

protected MailActivationSpec spec
The activation spec for the mail folder


endpointFactory

protected javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory
The message endpoint factory

Constructor Detail

MailActivation

public MailActivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                      MailActivationSpec spec)
Constructor

Parameters:
endpointFactory - The message endpoint factory
spec - The mail activation spec
Method Detail

getNextNewMsgCheckTime

public long getNextNewMsgCheckTime()
Get the next message check time

Returns:
The value

updateNextNewMsgCheckTime

public void updateNextNewMsgCheckTime(long now)
Update the next message check time

Parameters:
now - The current time

compareTo

public int compareTo(Object obj)

Specified by:
compareTo in interface Comparable

isReleased

public boolean isReleased()
Is the activation released ?

Returns:
True if released; otherwise false

release

public void release()
Release the activation

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

run

public void run()

Specified by:
run in interface Runnable


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