Interface ScopeAware

All Known Subinterfaces:
Repository<T>
All Known Implementing Classes:
AbstractRepository, AbstractSagaManager, AnnotatedSagaManager, CachingEventSourcingRepository, EventSourcingRepository, GenericJpaRepository, GenericJpaRepository, LockingRepository

public interface ScopeAware
Interface describing components which are Scope aware. Provides functionality to check if a given component can resolve a scope through a given ScopeDescriptor. If this holds, that component should be able to send a Message to that Scope.
Since:
3.3
Author:
Steven van Beelen
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canResolve(ScopeDescriptor scopeDescription)
    Check whether this implementation can resolve a Scope object based on the provided scopeDescription.
    void
    send(Message<?> message, ScopeDescriptor scopeDescription)
    Send a Message to a Scope which is described by the given scopeDescription.
  • Method Details

    • send

      void send(Message<?> message, ScopeDescriptor scopeDescription) throws Exception
      Send a Message to a Scope which is described by the given scopeDescription.
      Parameters:
      message - a Message to be send to a Scope
      scopeDescription - a D extending ScopeDescriptor, describing the Scope to send the given message to
      Throws:
      Exception - if sending the message failed. Might occur if the message handling process throws an exception
    • canResolve

      boolean canResolve(ScopeDescriptor scopeDescription)
      Check whether this implementation can resolve a Scope object based on the provided scopeDescription. Will return true in case it should be able to resolve the Scope and false if it cannot.
      Parameters:
      scopeDescription - a ScopeDescriptor describing the Scope to be resolved
      Returns:
      true in case it should be able to resolve the Scope and false if it cannot