@Override public ManagementRequestHandler<?, ?> resolveHandler(final RequestHandlerChain handlers, final ManagementRequestHeader header) { final byte operationId = header.getOperationId(); switch (operationId) { case DomainServerProtocol.REGISTER_REQUEST: handlers.registerActiveOperation(header.getBatchId(), null); return new ServerRegistrationRequestHandler(); case DomainServerProtocol.SERVER_RECONNECT_REQUEST: handlers.registerActiveOperation(header.getBatchId(), null); return new ServerReconnectRequestHandler(); case DomainServerProtocol.GET_FILE_REQUEST: handlers.registerActiveOperation(header.getBatchId(), null); return new GetFileOperation(); case DomainServerProtocol.SERVER_STARTED_REQUEST: handlers.registerActiveOperation(header.getBatchId(), serverInventory); return new ServerStartedHandler(serverProcessName); case DomainServerProtocol.SERVER_INSTABILITY_REQUEST: handlers.registerActiveOperation(header.getBatchId(), serverInventory); return new ServerUnstableHandler(serverProcessName); } return handlers.resolveNext(); }
@Override public ManagementRequestHandler<?, ?> resolveHandler(final RequestHandlerChain handlers, final ManagementRequestHeader header) { final byte operationId = header.getOperationId(); switch (operationId) { case DomainServerProtocol.REGISTER_REQUEST: handlers.registerActiveOperation(header.getBatchId(), null); return new ServerRegistrationRequestHandler(); case DomainServerProtocol.SERVER_RECONNECT_REQUEST: handlers.registerActiveOperation(header.getBatchId(), null); return new ServerReconnectRequestHandler(); case DomainServerProtocol.GET_FILE_REQUEST: handlers.registerActiveOperation(header.getBatchId(), null); return new GetFileOperation(); case DomainServerProtocol.SERVER_STARTED_REQUEST: handlers.registerActiveOperation(header.getBatchId(), serverInventory); return new ServerStartedHandler(serverProcessName); case DomainServerProtocol.SERVER_INSTABILITY_REQUEST: handlers.registerActiveOperation(header.getBatchId(), serverInventory); return new ServerUnstableHandler(serverProcessName); } return handlers.resolveNext(); }
@Override public ManagementRequestHandler<?, ?> resolveHandler(final RequestHandlerChain handlers, final ManagementRequestHeader header) { final byte operationId = header.getOperationId(); switch (operationId) { case DomainServerProtocol.REGISTER_REQUEST: handlers.registerActiveOperation(header.getBatchId(), null); return new ServerRegistrationRequestHandler(); case DomainServerProtocol.SERVER_RECONNECT_REQUEST: handlers.registerActiveOperation(header.getBatchId(), null); return new ServerReconnectRequestHandler(); case DomainServerProtocol.GET_FILE_REQUEST: handlers.registerActiveOperation(header.getBatchId(), null); return new GetFileOperation(); case DomainServerProtocol.SERVER_STARTED_REQUEST: handlers.registerActiveOperation(header.getBatchId(), serverInventory); return new ServerStartedHandler(serverProcessName); } return handlers.resolveNext(); }