Interface ICrossViewScopeRequestHandler<T extends Serializable,R extends ICrossViewScopeRequest<T>>
- Type Parameters:
T
- Type of the requested data.R
- Type of the request.
- All Superinterfaces:
Serializable
public interface ICrossViewScopeRequestHandler<T extends Serializable,R extends ICrossViewScopeRequest<T>>
extends Serializable
Handles a cross view scope request for a piece of data. Note that the
handleRequest(ICrossViewScopeRequest)
method is called within the scope of the request source, not within the scope of the request target. All state access
should only be done by the supplier returned by that method, which is invoked within the request target scope, i.e.
getViewPushContext()
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionhandleRequest
(R request) Handles a cross-scope request for a piece of data.
-
Method Details
-
handleRequest
Handles a cross-scope request for a piece of data. Note that this handler is called within the scope of the request source, not within the scope of the request target. All state access should only be done by the supplier returned by this method, which is invoked within the request target scope, i.e. the scope corresponding to thegetViewPushContext()
.- Parameters:
request
- Request that was issued.- Returns:
- The supplier that can create the response that should be returned.
null
when no response can or should not be provided. - Throws:
Exception
- When the request could not be processed. Treated as ifnull
had been returned.
-
getViewPushContext
BackendViewPushContext getViewPushContext()- Returns:
- The view scope within which the supplier returned by
handleRequest(ICrossViewScopeRequest)
will be invoked.
-