Class ObjectChangeRegistration

java.lang.Object
io.bdeploy.jersey.ws.change.ObjectChangeRegistration

public class ObjectChangeRegistration extends Object
Manages registrations for certain object change types and related ObjectScopes.
  • Constructor Details

    • ObjectChangeRegistration

      public ObjectChangeRegistration()
  • Method Details

    • add

      public void add(String type, ObjectScope scope)
      Add a matching scope for the given type.
    • remove

      public void remove(String type, ObjectScope scope)
      Remove a matching scope for the given type.
    • matches

      public boolean matches(String type, ObjectScope scope)
      Determines whether the given ObjectScope is matched by any of the registered ObjectScopes.
    • getBestScoring

      public ObjectScope getBestScoring(String type, ObjectScope scope)
      Calculates a match score, which determines "how much" the given scope matches.
    • addListener

      public void addListener(Consumer<ObjectChangeRegistration> listener)
      Parameters:
      listener - a listener to be notified on changes.