Interface EventHandler<T extends ProtocolEvent>

Type Parameters:
T - the concrete ProtocolEvent type this handler processes
All Known Subinterfaces:
ProtocolExtension<T>
All Known Implementing Classes:
BroadcastConsumerExtension, BroadcastProviderExtension, MembershipConsumerExtension, MembershipProviderExtension, ResolverProviderExtension, SignedMessageExtension
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EventHandler<T extends ProtocolEvent>
Functional interface for handling a ProtocolEvent.

Instances are created internally by BabelProtocolHolder using LambdaMetafactory to wrap protocol methods annotated with @UponBabelEvent.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the functional method.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleEvent(T event)
    Handles the given event.
  • Field Details

    • HANDLER_METHOD_NAME

      static final String HANDLER_METHOD_NAME
      The name of the functional method. Used internally for lambda generation.
      See Also:
  • Method Details

    • handleEvent

      void handleEvent(T event)
      Handles the given event.
      Parameters:
      event - the event to process; its runtime type matches T