@Override public void processEvent(OperationRequest operation, Event event) throws InvalidRequestException { // Create JSON-RPC error response. if (event.getType() == EventType.OPERATION_ERROR) { constructErrorResponse(operation, OperationErrorEvent.as(event).getMessage()); return; } // Create JSON-RPC success response. try { constructResponse(operation, EventSerializer.extractPropertiesToParamsPropertyMap(event)); } catch (EventSerializationException e) { LOG.severe("Internal Error occurred, when serializing events", e); throw new InvalidRequestException("Unable to serialize events", operation); } }
break; case OPERATION_ERROR: onOperationError(OperationErrorEvent.as(event)); break;