|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jsieve.SieveFactory
Singleton class SieveFactory is the primary invocation point for all Sieve operations. Theses are...
Constructor Summary | |
SieveFactory()
Constructor for SieveFactory. |
Method Summary | |
static SieveFactory |
computeInstance()
Computes an instance of the receiver. |
void |
evaluate(MailAdapter mail,
Node startNode)
Method evaluate evaluates an RFC 822 compliant mail message wrapped in a MailAdapter by visting each node of the parsed script beginning at the passed start node. |
static SieveFactory |
getInstance()
Returns the instance of the receiver, lazily initialised if required. |
void |
interpret(MailAdapter mail,
java.io.InputStream inputStream)
Method interpret parses a Sieve script and then evaluates the result against a mail. |
Node |
parse(java.io.InputStream inputStream)
Method parse parses a Sieve script into a hierarchy of parsed nodes. |
protected static void |
setInstance(SieveFactory instance)
Sets the instance of the receiver. |
protected static void |
updateInstance()
Updates the instance of the receiver. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SieveFactory()
Method Detail |
public Node parse(java.io.InputStream inputStream) throws ParseException
inputStream
-
ParseException
public void evaluate(MailAdapter mail, Node startNode) throws SieveException
Method evaluate evaluates an RFC 822 compliant mail message wrapped in a MailAdapter by visting each node of the parsed script beginning at the passed start node. As evaluation proceeds a List of Actions is added to the MailAdapter.
At the start of evaluation an 'implicitKeep' state is set. This can be cancelled by a Command during evaluation. If 'implicitKeep' is still set at the end of evaluation, a Keep Action is added to the List of Actions. Finally, each Action in the List is executed in the order they were added.
mail
- startNode
-
SieveException
public void interpret(MailAdapter mail, java.io.InputStream inputStream) throws ParseException, SieveException
mail
- inputStream
-
ParseException
SieveException
public static SieveFactory getInstance()
public static SieveFactory computeInstance()
protected static void setInstance(SieveFactory instance)
instance
- The instance to setprotected static void updateInstance()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |