org.gcube.common.events
Annotation Type Observes


@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface Observes

Identifies callback methods in event observers.

Optional attributes are used to indicate:

  • event qualifiers (Any by default);
  • whether the successful execution of the method is Observes.Kind.critical to the client. Non critical methods may be Observes.Kind.resilient or Observes.Kind.safe (the default), depending on whether they should or should not execute after previous critical failures;
  • the delay during which events are accumulated before being delivered.

    Author:
    Fabio Simeoni
    See Also:
    Hub

    Optional Element Summary
     long every
              The minimum duration in milliseconds between the delivery of two subsequent events.
     Observes.Kind kind
              The kind of the observer Observes.Kind.safe by default.
     String[] value
              The event qualifiers.
     

    value

    public abstract String[] value
    The event qualifiers.

    Returns:
    the qualifiers, Any by default.
    Default:
    "any"

    kind

    public abstract Observes.Kind kind
    The kind of the observer Observes.Kind.safe by default.

    Returns:
    the kind
    Default:
    org.gcube.common.events.Observes.Kind.safe

    every

    public abstract long every
    The minimum duration in milliseconds between the delivery of two subsequent events.

    Returns:
    the kind
    Default:
    0L


    Copyright © 2013. All Rights Reserved.