Interface DuplicationStrategy

All Known Implementing Classes:
DuplicationStrategyImpl, EnversListenerDuplicationStrategy

public interface DuplicationStrategy
Defines listener duplication checking strategy, both in terms of when a duplication is detected (see areMatch(java.lang.Object, java.lang.Object)) as well as how to handle a duplication (see getAction()).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The enumerated list of actions available on duplication match
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    areMatch(Object listener, Object original)
    Are the two listener instances considered a duplication?
    How should a duplication be handled?
  • Method Details

    • areMatch

      boolean areMatch(Object listener, Object original)
      Are the two listener instances considered a duplication?
      Parameters:
      listener - The listener we are currently trying to register
      original - An already registered listener
      Returns:
      true if the two instances are considered a duplication; false otherwise
    • getAction

      How should a duplication be handled?
      Returns:
      The strategy for handling duplication