Class DefaultEventLoop

java.lang.Object
org.springframework.shell.component.view.event.DefaultEventLoop
All Implemented Interfaces:
EventLoop

public class DefaultEventLoop extends Object implements EventLoop
Default implementation of an EventLoop.
  • Constructor Details

  • Method Details

    • dispatch

      public void dispatch(org.springframework.messaging.Message<?> message)
      Description copied from interface: EventLoop
      Dispatch a Message into an EventLoop.
      Specified by:
      dispatch in interface EventLoop
      Parameters:
      message - the message to dispatch
    • dispatch

      public void dispatch(org.reactivestreams.Publisher<? extends org.springframework.messaging.Message<?>> messages)
      Description copied from interface: EventLoop
      Dispatch Messages into an EventLoop from a Publisher. Usually type is either Mono or Flux.
      Specified by:
      dispatch in interface EventLoop
      Parameters:
      messages - the messages to dispatch
    • events

      public reactor.core.publisher.Flux<org.springframework.messaging.Message<?>> events()
      Description copied from interface: EventLoop
      Return a Flux of Message events. When subscribed events will be received until disposed or EventLoop terminates.
      Specified by:
      events in interface EventLoop
      Returns:
      the events from an event loop
    • events

      public <T> reactor.core.publisher.Flux<T> events(EventLoop.Type type, Class<T> clazz)
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe stream filtered by given eventloop message type and message payload class type.
      Specified by:
      events in interface EventLoop
      Type Parameters:
      T - the type to expect
      Parameters:
      type - the eventloop message type to filter
      clazz - the type class to filter
      Returns:
      the filtered events from an event loop
    • events

      public <T> reactor.core.publisher.Flux<T> events(EventLoop.Type type, org.springframework.core.ParameterizedTypeReference<T> typeRef)
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe stream filtered by given eventloop message type and message payload class type.
      Specified by:
      events in interface EventLoop
      Type Parameters:
      T - the type to expect
      Parameters:
      type - the eventloop message type to filter
      typeRef - the parameterized type to filter
      Returns:
      the filtered events from an event loop
    • keyEvents

      public reactor.core.publisher.Flux<KeyEvent> keyEvents()
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe KeyEvents.
      Specified by:
      keyEvents in interface EventLoop
      Returns:
      the key events from an event loop
    • mouseEvents

      public reactor.core.publisher.Flux<MouseEvent> mouseEvents()
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe MouseEvents.
      Specified by:
      mouseEvents in interface EventLoop
      Returns:
      the mouse events from an event loop
    • systemEvents

      public reactor.core.publisher.Flux<String> systemEvents()
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe {code system} events.
      Specified by:
      systemEvents in interface EventLoop
      Returns:
      the system events from an event loop
    • signalEvents

      public reactor.core.publisher.Flux<String> signalEvents()
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe {code signal} events.
      Specified by:
      signalEvents in interface EventLoop
      Returns:
      the signal events from an event loop
    • viewEvents

      public <T extends ViewEvent> reactor.core.publisher.Flux<T> viewEvents(Class<T> clazz)
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe ViewEvents.
      Specified by:
      viewEvents in interface EventLoop
      Type Parameters:
      T - the type to expect
      Parameters:
      clazz - the type class to filter
      Returns:
      the filtered events from an event loop
    • viewEvents

      public <T extends ViewEvent> reactor.core.publisher.Flux<T> viewEvents(org.springframework.core.ParameterizedTypeReference<T> typeRef)
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe ViewEvents.
      Specified by:
      viewEvents in interface EventLoop
      Type Parameters:
      T - the type to expect
      Parameters:
      typeRef - the parameterized type to filter
      Returns:
      the filtered events from an event loop
    • viewEvents

      public <T extends ViewEvent> reactor.core.publisher.Flux<T> viewEvents(Class<T> clazz, View filterBy)
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe ViewEvents.
      Specified by:
      viewEvents in interface EventLoop
      Type Parameters:
      T - the type to expect
      Parameters:
      clazz - the type class to filter
      filterBy - the view to filter
      Returns:
      the filtered events from an event loop
    • viewEvents

      public <T extends ViewEvent> reactor.core.publisher.Flux<T> viewEvents(org.springframework.core.ParameterizedTypeReference<T> typeRef, View filterBy)
      Description copied from interface: EventLoop
      Specialisation of EventLoop.events() which returns type safe ViewEvents.
      Specified by:
      viewEvents in interface EventLoop
      Type Parameters:
      T - the type to expect
      Parameters:
      typeRef - the parameterized type to filter
      filterBy - the view to filter
      Returns:
      the filtered events from an event loop
    • onDestroy

      public void onDestroy(reactor.core.Disposable disposable)
      Description copied from interface: EventLoop
      Register Disposable to get disposed when event loop terminates.
      Specified by:
      onDestroy in interface EventLoop
      Parameters:
      disposable - a disposable to dispose
    • subscribeTo

      public void subscribeTo(org.reactivestreams.Publisher<? extends org.springframework.messaging.Message<?>> publisher)
    • destroy

      public void destroy()