Class DefaultEventLoop
java.lang.Object
org.springframework.shell.component.view.event.DefaultEventLoop
- All Implemented Interfaces:
EventLoop
Default implementation of an
EventLoop.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.shell.component.view.event.EventLoop
EventLoop.EventLoopProcessor, EventLoop.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddispatch(org.reactivestreams.Publisher<? extends org.springframework.messaging.Message<?>> messages) DispatchMessages into anEventLoopfrom aPublisher.voiddispatch(org.springframework.messaging.Message<?> message) Dispatch aMessageinto anEventLoop.reactor.core.publisher.Flux<org.springframework.messaging.Message<?>>events()Return aFluxofMessageevents.<T> reactor.core.publisher.Flux<T>events(EventLoop.Type type, Class<T> clazz) Specialisation ofEventLoop.events()which returns type safe stream filtered by given eventloop message type and message payload class type.<T> reactor.core.publisher.Flux<T>events(EventLoop.Type type, org.springframework.core.ParameterizedTypeReference<T> typeRef) Specialisation ofEventLoop.events()which returns type safe stream filtered by given eventloop message type and message payload class type.reactor.core.publisher.Flux<KeyEvent>Specialisation ofEventLoop.events()which returns type safeKeyEvents.reactor.core.publisher.Flux<MouseEvent>Specialisation ofEventLoop.events()which returns type safeMouseEvents.voidonDestroy(reactor.core.Disposable disposable) RegisterDisposableto get disposed when event loop terminates.reactor.core.publisher.Flux<String>Specialisation ofEventLoop.events()which returns type safe {code signal} events.voidsubscribeTo(org.reactivestreams.Publisher<? extends org.springframework.messaging.Message<?>> publisher) reactor.core.publisher.Flux<String>Specialisation ofEventLoop.events()which returns type safe {code system} events.<T extends ViewEvent>
reactor.core.publisher.Flux<T>viewEvents(Class<T> clazz) Specialisation ofEventLoop.events()which returns type safeViewEvents.<T extends ViewEvent>
reactor.core.publisher.Flux<T>viewEvents(Class<T> clazz, View filterBy) Specialisation ofEventLoop.events()which returns type safeViewEvents.<T extends ViewEvent>
reactor.core.publisher.Flux<T>viewEvents(org.springframework.core.ParameterizedTypeReference<T> typeRef) Specialisation ofEventLoop.events()which returns type safeViewEvents.<T extends ViewEvent>
reactor.core.publisher.Flux<T>viewEvents(org.springframework.core.ParameterizedTypeReference<T> typeRef, View filterBy) Specialisation ofEventLoop.events()which returns type safeViewEvents.
-
Constructor Details
-
DefaultEventLoop
public DefaultEventLoop() -
DefaultEventLoop
-
-
Method Details
-
dispatch
public void dispatch(org.springframework.messaging.Message<?> message) Description copied from interface:EventLoopDispatch aMessageinto anEventLoop. -
dispatch
public void dispatch(org.reactivestreams.Publisher<? extends org.springframework.messaging.Message<?>> messages) Description copied from interface:EventLoopDispatchMessages into anEventLoopfrom aPublisher. Usually type is eitherMonoorFlux. -
events
public reactor.core.publisher.Flux<org.springframework.messaging.Message<?>> events()Description copied from interface:EventLoopReturn aFluxofMessageevents. When subscribed events will be received until disposed orEventLoopterminates. -
events
Description copied from interface:EventLoopSpecialisation ofEventLoop.events()which returns type safe stream filtered by given eventloop message type and message payload class type. -
events
public <T> reactor.core.publisher.Flux<T> events(EventLoop.Type type, org.springframework.core.ParameterizedTypeReference<T> typeRef) Description copied from interface:EventLoopSpecialisation ofEventLoop.events()which returns type safe stream filtered by given eventloop message type and message payload class type. -
keyEvents
Description copied from interface:EventLoopSpecialisation ofEventLoop.events()which returns type safeKeyEvents. -
mouseEvents
Description copied from interface:EventLoopSpecialisation ofEventLoop.events()which returns type safeMouseEvents.- Specified by:
mouseEventsin interfaceEventLoop- Returns:
- the mouse events from an event loop
-
systemEvents
Description copied from interface:EventLoopSpecialisation ofEventLoop.events()which returns type safe {code system} events.- Specified by:
systemEventsin interfaceEventLoop- Returns:
- the system events from an event loop
-
signalEvents
Description copied from interface:EventLoopSpecialisation ofEventLoop.events()which returns type safe {code signal} events.- Specified by:
signalEventsin interfaceEventLoop- Returns:
- the signal events from an event loop
-
viewEvents
Description copied from interface:EventLoopSpecialisation ofEventLoop.events()which returns type safeViewEvents.- Specified by:
viewEventsin interfaceEventLoop- 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:EventLoopSpecialisation ofEventLoop.events()which returns type safeViewEvents.- Specified by:
viewEventsin interfaceEventLoop- 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:EventLoopSpecialisation ofEventLoop.events()which returns type safeViewEvents.- Specified by:
viewEventsin interfaceEventLoop- Type Parameters:
T- the type to expect- Parameters:
clazz- the type class to filterfilterBy- 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:EventLoopSpecialisation ofEventLoop.events()which returns type safeViewEvents.- Specified by:
viewEventsin interfaceEventLoop- Type Parameters:
T- the type to expect- Parameters:
typeRef- the parameterized type to filterfilterBy- the view to filter- Returns:
- the filtered events from an event loop
-
onDestroy
public void onDestroy(reactor.core.Disposable disposable) Description copied from interface:EventLoopRegisterDisposableto get disposed when event loop terminates. -
subscribeTo
public void subscribeTo(org.reactivestreams.Publisher<? extends org.springframework.messaging.Message<?>> publisher) -
destroy
public void destroy()
-