org.apache.directory.server.core.invocation
Class InvocationStack

java.lang.Object
  extended by org.apache.directory.server.core.invocation.InvocationStack

public final class InvocationStack
extends java.lang.Object

Keeps track of recursive Invocations. This stack assumes an invocation occurs in the same thread since it is called first, so we manages stacks for each invocation in ThreadLocal-like manner. You can just use getInstance() to get current invocation stack.

Version:
$Rev: 662440 $, $Date: 2008-06-02 16:00:23 +0200 (Mo, 02 Jun 2008) $
Author:
Apache Directory Project

Method Summary
static InvocationStack getInstance()
          Returns the invocation stack of current thread.
 boolean isEmpty()
          Returns true if the stack is empty false otherwise.
 OperationContext peek()
          Returns the latest invocation.
 OperationContext pop()
          Pops the latest invocation from this stack.
 void push(OperationContext opContext)
          Pushes the specified invocation to this stack.
 OperationContext[] toArray()
          Returns an array of Invocations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static InvocationStack getInstance()
Returns the invocation stack of current thread.


toArray

public OperationContext[] toArray()
Returns an array of Invocations. 0th element is the latest invocation.


peek

public OperationContext peek()
Returns the latest invocation.


isEmpty

public boolean isEmpty()
Returns true if the stack is empty false otherwise.


push

public void push(OperationContext opContext)
Pushes the specified invocation to this stack.


pop

public OperationContext pop()
Pops the latest invocation from this stack. This stack is released automatically if you pop all items from this stack.



Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.