Package com.linkedin.restli.internal.server.filter

Examples of com.linkedin.restli.internal.server.filter.FilterResponseContextInternal


  private void invokeFiltersAndProcessResults(RequestExecutionReport executionReport,
                                              final AugmentedRestLiResponseData responseData,
                                              final Throwable appEx)
  {
    // Construct the filter response context from the partial response.
    final FilterResponseContextInternal responseContext = new FilterResponseContextAdapter(responseData);
    try
    {
      invokeResponseFilters(responseContext, appEx);
      // Invoke onSuccess on the R2 callback since the response from the resource was
      // successfully processed by the filters.
      // Convert response data to partial rest response.
      final PartialRestResponse response = _responseHandler.buildPartialResponse(_method, responseContext.getAugmentedRestLiResponseData());
      // Invoke the callback.
      _callback.onSuccess(_responseHandler.buildResponse(_method, response), executionReport);
    }
    catch (Throwable e)
    {
      // Invoke onError on the R2 callback since we received an exception from the filters.
      _callback.onError(_responseHandler.buildRestException(e,
                                                            _responseHandler.buildPartialResponse(_method,
                                                                                                  responseContext.getAugmentedRestLiResponseData())),
                        executionReport);
    }
  }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.internal.server.filter.FilterResponseContextInternal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.