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 boolean
accepts(Object event)
Returnstrue
if the listener instance can process the specified event object,false
otherwise.Class
getEventType()
Method
getMethod()
protected Class
getMethodArgumentType(Method method)
Object
getTarget()
void
onEvent(Object event)
Handles the specified event.
-
-
-
Constructor Detail
-
SingleArgumentMethodEventListener
public SingleArgumentMethodEventListener(Object target, Method method)
-
-
Method Detail
-
accepts
public boolean accepts(Object event)
Description copied from interface:EventListener
Returnstrue
if the listener instance can process the specified event object,false
otherwise.- Specified by:
accepts
in interfaceEventListener
- Parameters:
event
- the event object to test- Returns:
true
if the listener instance can process the specified event object,false
otherwise.
-
getEventType
public Class getEventType()
- Specified by:
getEventType
in interfaceTypedEventListener
-
onEvent
public void onEvent(Object event)
Description copied from interface:EventListener
Handles 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:
onEvent
in interfaceEventListener
- Parameters:
event
- the event to handle.
-
getMethodArgumentType
protected Class getMethodArgumentType(Method method)
-
-