madkit.message

## Class SenderRoleFilter

- java.lang.Object
- - madkit.message.SenderRoleFilter

- All Implemented Interfaces:
    MessageFilter

      public class SenderRoleFilter
      extends java.lang.Object
      implements MessageFilter

  A filter that accepts message based on the sender's role.
  Since:
    MaDKit 5.0.4
  Version:
    0.9
  Author:
    Fabien Michel

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SenderRoleFilter(java.lang.String community, java.lang.String group, java.lang.String role)` a new filter that acts according to the sender's CGR location.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(Message m)` Tests if a specified message matches the requirement.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SenderRoleFilter

          public SenderRoleFilter(java.lang.String community,
                                  java.lang.String group,
                                  java.lang.String role)

      a new filter that acts according to the sender's CGR location.
      Parameters:
        `community` -
        `group` -
        `role` - the role that the sender must have

  - ### Method Detail

    - #### accept

          public boolean accept(Message m)

      Description copied from interface: `MessageFilter`
      Tests if a specified message matches the requirement.
      Specified by:
        `accept` in interface `MessageFilter`
      Parameters:
        `m` - the message to test.
      Returns:
        `true` if and only if the message matches the requirement.

Fabien Michel, Olivier Gutknecht, Jacques Ferber - September 9 2019