@Override public ManagementRequestHandler<?, ?> resolveHandler(final RequestHandlerChain handlers, final ManagementRequestHeader header) { switch (header.getOperationId()) { case ModelControllerProtocol.EXECUTE_ASYNC_CLIENT_REQUEST: case ModelControllerProtocol.EXECUTE_CLIENT_REQUEST: // initialize the operation ctx before executing the request handler handlers.registerActiveOperation(header.getBatchId(), null); return new ExecuteRequestHandler(); case ModelControllerProtocol.CANCEL_ASYNC_REQUEST: return new CancelAsyncRequestHandler(); case ModelControllerProtocol.GET_CHUNKED_INPUTSTREAM_REQUEST: // initialize the operation ctx before executing the request handler handlers.registerActiveOperation(header.getBatchId(), null); return responseAttachmentSupport.getReadHandler(); case ModelControllerProtocol.CLOSE_INPUTSTREAM_REQUEST: // initialize the operation ctx before executing the request handler handlers.registerActiveOperation(header.getBatchId(), null); return responseAttachmentSupport.getCloseHandler(); } return handlers.resolveNext(); }
@Override public ManagementRequestHandler<?, ?> resolveHandler(final RequestHandlerChain handlers, final ManagementRequestHeader header) { switch (header.getOperationId()) { case ModelControllerProtocol.EXECUTE_ASYNC_CLIENT_REQUEST: case ModelControllerProtocol.EXECUTE_CLIENT_REQUEST: // initialize the operation ctx before executing the request handler handlers.registerActiveOperation(header.getBatchId(), null); return new ExecuteRequestHandler(); case ModelControllerProtocol.CANCEL_ASYNC_REQUEST: return new CancelAsyncRequestHandler(); case ModelControllerProtocol.GET_CHUNKED_INPUTSTREAM_REQUEST: // initialize the operation ctx before executing the request handler handlers.registerActiveOperation(header.getBatchId(), null); return responseAttachmentSupport.getReadHandler(); case ModelControllerProtocol.CLOSE_INPUTSTREAM_REQUEST: // initialize the operation ctx before executing the request handler handlers.registerActiveOperation(header.getBatchId(), null); return responseAttachmentSupport.getCloseHandler(); } return handlers.resolveNext(); }
return responseAttachmentSupport.getCloseHandler();
return responseAttachmentSupport.getCloseHandler();