public class RxModule extends AbstractModule implements HandlerDecoratingModule
This module MUST be registered with a Ratpack application in order to use the Rx integration. It registers plugins with Rx which must be used.
RxBackground
- create observables for background operations.
When the application starts, this module will register a special error handler with Rx that forwards any unhandled
errors to the active thread's context's error handler (via ReadOnlyContext.error(Exception)
).
This means that you do not need to register explicit error handlers for any observable to route to the error handler.
If you are observing on a thread that is not managed by Ratpack (i.e. not a request or Background
thread),
this error handler is non effectual as there is no error handler to forward to.
Constructor and Description |
---|
RxModule() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure() |
Handler |
decorate(Injector injector,
Handler handler)
Decorate the given handler with any global logic.
|
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
protected void configure()
configure
in class AbstractModule
public Handler decorate(Injector injector, Handler handler)
HandlerDecoratingModule
decorate
in interface HandlerDecoratingModule
injector
- The injector created from all the application moduleshandler
- The application handler