jodd.madvoc.interceptor
Class ActionInterceptor

java.lang.Object
  extended by jodd.madvoc.interceptor.ActionInterceptor
Direct Known Subclasses:
ActionInterceptorStack, AnnotatedFieldsInterceptor, DefaultWebAppInterceptors, EchoInterceptor, IdRequestInjectorInterceptor, PrepareInterceptor, ServletConfigInterceptor

public abstract class ActionInterceptor
extends java.lang.Object

Action interceptor.


Field Summary
protected  boolean enabled
           
protected  boolean initialized
           
 
Constructor Summary
ActionInterceptor()
           
 
Method Summary
 void init()
          Invoked on interceptor initialization.
 void initialized()
          Marks that interceptor is initialized.
abstract  java.lang.Object intercept(ActionRequest actionRequest)
          Intercepts action requests.
 java.lang.Object invoke(ActionRequest actionRequest)
          Invokes interceptor using enabled information.
 boolean isEnabled()
          Returns true if interceptor is enabled.
 boolean isInitialized()
          Returns true if interceptor is initialized.
 void setEnabled(boolean enabled)
          Defines if interceptor is enabled.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

enabled

protected boolean enabled

initialized

protected boolean initialized
Constructor Detail

ActionInterceptor

public ActionInterceptor()
Method Detail

isInitialized

public final boolean isInitialized()
Returns true if interceptor is initialized.


initialized

public final void initialized()
Marks that interceptor is initialized.


isEnabled

public boolean isEnabled()
Returns true if interceptor is enabled.


setEnabled

public void setEnabled(boolean enabled)
Defines if interceptor is enabled.


init

public void init()
Invoked on interceptor initialization.


invoke

public final java.lang.Object invoke(ActionRequest actionRequest)
                              throws java.lang.Exception
Invokes interceptor using enabled information. When interceptor is disabled, control is passed to the next one. When interceptor is enabled, it will be invoked before the next one (or the action).

Throws:
java.lang.Exception

intercept

public abstract java.lang.Object intercept(ActionRequest actionRequest)
                                    throws java.lang.Exception
Intercepts action requests.

Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2012 Jodd Team