public class RequestResponseTracker extends Object
Ensures that there is only one outgoing server request active at a given time.
Fires events when a requests starts, response handling starts and when response handling ends.
| Constructor and Description |
|---|
RequestResponseTracker(Registry registry)
Creates a new instance connected to the given registry.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.web.bindery.event.shared.HandlerRegistration |
addRequestStartingHandler(RequestStartingEvent.Handler handler)
Adds a handler for
RequestStartingEvents. |
com.google.web.bindery.event.shared.HandlerRegistration |
addResponseHandlingEndedHandler(ResponseHandlingEndedEvent.Handler handler)
Adds a handler for
ResponseHandlingEndedEvents. |
com.google.web.bindery.event.shared.HandlerRegistration |
addResponseHandlingStartedHandler(ResponseHandlingStartedEvent.Handler handler)
Adds a handler for
ResponseHandlingStartedEvents. |
void |
endRequest()
Marks that the current request has ended.
|
boolean |
hasActiveRequest()
Checks is there is an active UIDL request.
|
void |
startRequest()
Marks that a new request has started.
|
public RequestResponseTracker(Registry registry)
registry - the global registrypublic void startRequest()
Should not be called when a request is in progress, i.e.
startRequest() has been called but not endRequest().
Fires a RequestStartingEvent.
public boolean hasActiveRequest()
public void endRequest()
Should not be called unless a request is in progress, i.e.
startRequest() has been called but not endRequest().
Will trigger sending of any pending invocations to the server.
Fires a ResponseHandlingEndedEvent.
public com.google.web.bindery.event.shared.HandlerRegistration addRequestStartingHandler(RequestStartingEvent.Handler handler)
RequestStartingEvents.handler - the handler to addpublic com.google.web.bindery.event.shared.HandlerRegistration addResponseHandlingStartedHandler(ResponseHandlingStartedEvent.Handler handler)
ResponseHandlingStartedEvents.handler - the handler to addpublic com.google.web.bindery.event.shared.HandlerRegistration addResponseHandlingEndedHandler(ResponseHandlingEndedEvent.Handler handler)
ResponseHandlingEndedEvents.handler - the handler to addCopyright © 2000–2026 Vaadin Ltd. All rights reserved.