Class Filters.RejectSubtypes

  • All Implemented Interfaces:
    IMessageFilter
    Enclosing class:
    Filters

    public static final class Filters.RejectSubtypes
    extends java.lang.Object
    implements IMessageFilter
    This filter will only accept messages of the exact same type as specified for the handler. Subclasses (this includes interface implementations) will be rejected. NOTE: The same functionality (with better performance) is achieved using rejectSubtypes = true in the @Handler annotation
    • Constructor Summary

      Constructors 
      Constructor Description
      RejectSubtypes()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accepts​(java.lang.Object event, SubscriptionContext context)
      Check whether the message matches some criteria
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RejectSubtypes

        public RejectSubtypes()
    • Method Detail

      • accepts

        public boolean accepts​(java.lang.Object event,
                               SubscriptionContext context)
        Description copied from interface: IMessageFilter
        Check whether the message matches some criteria
        Specified by:
        accepts in interface IMessageFilter
        Parameters:
        event - The message to be handled by the handler
        context - The context object containing a description of the message handler and the bus environment
        Returns:
        true: if the message matches the criteria and should be delivered to the handler false: otherwise