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 Details

    • SingleArgumentMethodEventListener

      public SingleArgumentMethodEventListener(Object target, Method method)
  • Method Details

    • getTarget

      public Object getTarget()
    • getMethod

      public Method getMethod()
    • accepts

      public boolean accepts(Object event)
      Description copied from interface: EventListener
      Returns true if the listener instance can process the specified event object, false otherwise.
      Specified by:
      accepts in interface EventListener
      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 interface TypedEventListener
    • 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 interface EventListener
      Parameters:
      event - the event to handle.
    • getMethodArgumentType

      protected Class getMethodArgumentType(Method method)