org.apache.jsieve.mailet
Class ActionDispatcher

java.lang.Object
  extended by org.apache.jsieve.mailet.ActionDispatcher

public class ActionDispatcher
extends java.lang.Object

Dynamically dispatches an Action depending on the type of Action received at runtime.

Thread Safety

An instance maybe safe accessed concurrently by multiple threads.


Constructor Summary
ActionDispatcher()
          Constructor for ActionDispatcher.
 
Method Summary
 void execute(Action anAction, org.apache.mailet.Mail aMail, ActionContext context)
          Method execute executes the passed Action by invoking the method mapped by the receiver with a parameter of the EXACT type of Action.
 java.util.concurrent.ConcurrentMap<java.lang.Class,MailAction> getMethodMap()
          Returns the methodMap.
protected  void setMethodMap(java.util.concurrent.ConcurrentMap<java.lang.Class,MailAction> mailActionMap)
          Sets the mail action mail.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionDispatcher

public ActionDispatcher()
                 throws javax.mail.MessagingException
Constructor for ActionDispatcher.

Throws:
java.lang.NoSuchMethodException
javax.mail.MessagingException
Method Detail

execute

public void execute(Action anAction,
                    org.apache.mailet.Mail aMail,
                    ActionContext context)
             throws javax.mail.MessagingException
Method execute executes the passed Action by invoking the method mapped by the receiver with a parameter of the EXACT type of Action.

Parameters:
anAction - not null
aMail - not null
context - not null
Throws:
javax.mail.MessagingException

getMethodMap

public java.util.concurrent.ConcurrentMap<java.lang.Class,MailAction> getMethodMap()
Returns the methodMap.

Returns:
Map

setMethodMap

protected void setMethodMap(java.util.concurrent.ConcurrentMap<java.lang.Class,MailAction> mailActionMap)
Sets the mail action mail.

Parameters:
mailActionMap - not null


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.