@groovy.transform.CompileStatic @groovy.util.logging.Slf4j class RxResultSubscriber extends java.lang.Object
A io.reactivex.Emitter that processed items emitted from an java.util.Observable and produces an appropriate response.
If the java.util.Observable emits a RxResult then processing is delegated to the result with the execute method being wrapped in the asynchronous request.
Otherwise the current controller's respond method is called with the object emitted from the observable
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
DATA_PREFIX |
The prefix for server sent events |
protected RxCompletionStrategy |
completionStrategy |
| Type | Name and description |
|---|---|
boolean |
asyncComplete |
org.grails.plugins.web.async.GrailsAsyncContext |
asyncContextThe Async context |
grails.artefact.Controller |
controllerThe controller instance |
grails.core.GrailsControllerClass |
controllerClassThe controller class |
io.reactivex.disposables.Disposable |
disposablethe disposable |
org.grails.web.errors.GrailsExceptionResolver |
exceptionResolverThe exception handler |
boolean |
isRenderWhether this is a call to render |
grails.web.mapping.LinkGenerator |
linkGeneratorThe link generator |
java.lang.String |
serverSendEventNameThe server send event name |
boolean |
serverSendEventsWhether server end events are being used |
grails.web.UrlConverter |
urlConverterThe url converter |
| Constructor and description |
|---|
RxResultSubscriber
(org.grails.plugins.web.async.GrailsAsyncContext asyncContext, org.grails.web.errors.GrailsExceptionResolver exceptionResolver, grails.web.mapping.LinkGenerator linkGenerator, grails.core.GrailsControllerClass controllerClass, grails.artefact.Controller controller) |
| Type | Name and description |
|---|---|
void |
onComplete() |
void |
onComplete(javax.servlet.AsyncEvent event) |
void |
onError(java.lang.Throwable e) |
void |
onError(javax.servlet.AsyncEvent event) |
void |
onNext(java.lang.Object o) |
void |
onStartAsync(javax.servlet.AsyncEvent event) |
void |
onSubscribe(io.reactivex.disposables.Disposable d) |
void |
onTimeout(javax.servlet.AsyncEvent event) |
protected void |
sendDefaultError(java.lang.Throwable e, javax.servlet.http.HttpServletResponse httpServletResponse) |
T |
withRequest(groovy.lang.Closure<T> callable)Wrap the given closure in asynchronous request processing |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The prefix for server sent events
The Async context
The controller instance
The controller class
the disposable
The exception handler
Whether this is a call to render
The link generator
The server send event name
Whether server end events are being used
The url converter
Wrap the given closure in asynchronous request processing
callable - The closureGroovy Documentation