站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 common API Documentation 英文版文档

Valve (JBoss/Common API) - JBoss 3.2.7 common API Documentation 英文版文档


org.jboss.util
Class Valve

java.lang.Object
  extended byorg.jboss.util.Valve

public class Valve
extends Object

A simple valve with no support for re-opening.

Version:
$Revision: 1.1.2.1 $
Author:
Adrian Brock

Field Summary
static int CLOSED
          The valve is in hold state
static int CLOSING
          The valve is in holding state
protected  int invocations
          The invocation count
static int OPEN
          The valve is open
protected  int state
          The state
protected  Object stateLock
          The state lock
 
Constructor Summary
  Valve()
          Create a valve in the open state
protected Valve(int state)
          Create a valve with the give initial state
 
Method Summary
 void afterInvocation()
          Invoked after an invocation
 boolean beforeInvocation()
          Invoked before an invocation
 void closed()
          Invoked after closing
 void closing()
          Invoked before closing
 boolean isClosed()
          Are we closed?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPEN

public static final int OPEN
The valve is open

See Also:
Constant Field Values

CLOSING

public static final int CLOSING
The valve is in holding state

See Also:
Constant Field Values

CLOSED

public static final int CLOSED
The valve is in hold state

See Also:
Constant Field Values

stateLock

protected Object stateLock
The state lock


state

protected int state
The state


invocations

protected int invocations
The invocation count

Constructor Detail

Valve

public Valve()
Create a valve in the open state


Valve

protected Valve(int state)
Create a valve with the give initial state

Parameters:
state - the initial state
Method Detail

isClosed

public boolean isClosed()
Are we closed?

Returns:
true when closing or closed, false otherwise

beforeInvocation

public boolean beforeInvocation()
Invoked before an invocation

Returns:
true if allowed entry, false otherwise

afterInvocation

public void afterInvocation()
Invoked after an invocation


closing

public void closing()
Invoked before closing


closed

public void closed()
Invoked after closing



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.