Package org.apache.shiro.event.support
Class SingleArgumentMethodEventListener
- java.lang.Object
-
- org.apache.shiro.event.support.SingleArgumentMethodEventListener
-
- All Implemented Interfaces:
EventListener,TypedEventListener
public class SingleArgumentMethodEventListener extends Object implements TypedEventListener
A event listener that invokes a target object's method that accepts a single event argument.- Since:
- 1.3
-
-
Constructor Summary
Constructors Constructor Description SingleArgumentMethodEventListener(Object target, Method method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(Object event)Returnstrueif the listener instance can process the specified event object,falseotherwise.ClassgetEventType()MethodgetMethod()protected ClassgetMethodArgumentType(Method method)ObjectgetTarget()voidonEvent(Object event)Handles the specified event.
-
-
-
Method Detail
-
getTarget
public Object getTarget()
-
getMethod
public Method getMethod()
-
accepts
public boolean accepts(Object event)
Description copied from interface:EventListenerReturnstrueif the listener instance can process the specified event object,falseotherwise.- Specified by:
acceptsin interfaceEventListener- Parameters:
event- the event object to test- Returns:
trueif the listener instance can process the specified event object,falseotherwise.
-
getEventType
public Class getEventType()
- Specified by:
getEventTypein interfaceTypedEventListener
-
onEvent
public void onEvent(Object event)
Description copied from interface:EventListenerHandles the specified event. Again, as this interface is an implementation concept, implementations of this method will likely dispatch the event to a 'real' processor (e.g. method).- Specified by:
onEventin interfaceEventListener- Parameters:
event- the event to handle.
-
-