Search in sources :

Example 6 with RestLiFilterChain

use of com.linkedin.restli.internal.server.filter.RestLiFilterChain in project rest.li by linkedin.

the class TestRestLiCallback method setUp.

@BeforeTest
protected void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    _filterResponseContextFactory = new RestLiFilterResponseContextFactory<Object>(_restRequest, _routingResult, _responseHandler);
    _filterChainCallback = new FilterChainCallbackImpl(_routingResult, _methodInvoker, _adapter, _requestExecutionReportBuilder, _requestAttachmentReader, _responseHandler, _callback);
    _zeroFilterChain = new RestLiFilterChain(_filterChainCallback);
    _oneFilterChain = new RestLiFilterChain(Arrays.asList(_filter), _filterChainCallback);
    _twoFilterChain = new RestLiFilterChain(Arrays.asList(_filter, _filter), _filterChainCallback);
    _noFilterRestLiCallback = new RestLiCallback<Object>(_filterRequestContext, _filterResponseContextFactory, _zeroFilterChain);
    _oneFilterRestLiCallback = new RestLiCallback<Object>(_filterRequestContext, _filterResponseContextFactory, _oneFilterChain);
    _twoFilterRestLiCallback = new RestLiCallback<Object>(_filterRequestContext, _filterResponseContextFactory, _twoFilterChain);
}
Also used : FilterChainCallbackImpl(com.linkedin.restli.internal.server.filter.FilterChainCallbackImpl) RestLiFilterChain(com.linkedin.restli.internal.server.filter.RestLiFilterChain) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

RestLiFilterChain (com.linkedin.restli.internal.server.filter.RestLiFilterChain)6 RoutingResult (com.linkedin.restli.internal.server.RoutingResult)5 FilterChainCallback (com.linkedin.restli.internal.server.filter.FilterChainCallback)5 FilterChainCallbackImpl (com.linkedin.restli.internal.server.filter.FilterChainCallbackImpl)5 RestException (com.linkedin.r2.message.rest.RestException)4 RestRequest (com.linkedin.r2.message.rest.RestRequest)4 RestRequestBuilder (com.linkedin.r2.message.rest.RestRequestBuilder)4 RestResponse (com.linkedin.r2.message.rest.RestResponse)4 RestLiAttachmentReader (com.linkedin.restli.common.attachments.RestLiAttachmentReader)4 ResourceContextImpl (com.linkedin.restli.internal.server.ResourceContextImpl)4 RestLiCallback (com.linkedin.restli.internal.server.RestLiCallback)4 ServerResourceContext (com.linkedin.restli.internal.server.ServerResourceContext)4 RestLiResponseHandler (com.linkedin.restli.internal.server.response.RestLiResponseHandler)4 RestLiSyntaxException (com.linkedin.restli.internal.server.util.RestLiSyntaxException)4 RequestExecutionReport (com.linkedin.restli.server.RequestExecutionReport)4 RestLiResponseAttachments (com.linkedin.restli.server.RestLiResponseAttachments)4 RoutingException (com.linkedin.restli.server.RoutingException)4 URI (java.net.URI)4 EasyMock.anyObject (org.easymock.EasyMock.anyObject)4 BeforeTest (org.testng.annotations.BeforeTest)4