org.apache.jsieve
Class CommandStateManager

java.lang.Object
  extended byorg.apache.jsieve.CommandStateManager

public class CommandStateManager
extends java.lang.Object

Thread singleton class CommandStateManager records the state of a Sieve evaluation.


Method Summary
protected static CommandStateManager computeInstance()
          Answers a new instance of the receiver.
static CommandStateManager getInstance()
           Returns an instance of the receiver for the current thread, lazily intialised if required.
protected  void initialize()
          Initialize the receiver.
 boolean isHasActions()
          Returns the hasActions.
 boolean isImplicitKeep()
          Returns the implicitKeep.
 boolean isInProlog()
          Returns the inProlog.
 boolean isRejected()
          Returns the isRejected.
static void resetInstance()
          resets the current CommandStateManager.
 void setHasActions(boolean hasActions)
          Sets the hasActions.
 void setImplicitKeep(boolean implicitKeep)
          Sets the implicitKeep.
 void setInProlog(boolean inProlog)
          Sets the inProlog.
protected static void setInstance(CommandStateManager conditionManager)
          Sets the CommandStateManager for the current thread.
 void setRejected(boolean isRejected)
          Sets the isRejected.
protected static void updateInstance()
          Updates the current CommandStateManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initialize

protected void initialize()
Initialize the receiver.


computeInstance

protected static CommandStateManager computeInstance()
Answers a new instance of the receiver.

Returns:
ConditionManager

getInstance

public static CommandStateManager getInstance()

Returns an instance of the receiver for the current thread, lazily intialised if required.

Note that this must be synchronized to prevent another thread detecting the null state while this thread is initialising.

Returns:
ConditionManager

setInstance

protected static void setInstance(CommandStateManager conditionManager)
Sets the CommandStateManager for the current thread.

Parameters:
conditionManager - The CommandStateManager to set

resetInstance

public static void resetInstance()
resets the current CommandStateManager.


updateInstance

protected static void updateInstance()
Updates the current CommandStateManager.


isHasActions

public boolean isHasActions()
Returns the hasActions.

Returns:
boolean

isInProlog

public boolean isInProlog()
Returns the inProlog.

Returns:
boolean

isRejected

public boolean isRejected()
Returns the isRejected.

Returns:
boolean

setHasActions

public void setHasActions(boolean hasActions)
Sets the hasActions.

Parameters:
hasActions - The hasActions to set

setInProlog

public void setInProlog(boolean inProlog)
Sets the inProlog.

Parameters:
inProlog - The inProlog to set

setRejected

public void setRejected(boolean isRejected)
Sets the isRejected.

Parameters:
isRejected - The isRejected to set

isImplicitKeep

public boolean isImplicitKeep()
Returns the implicitKeep.

Returns:
boolean

setImplicitKeep

public void setImplicitKeep(boolean implicitKeep)
Sets the implicitKeep.

Parameters:
implicitKeep - The implicitKeep to set


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