@Override public void processRecord( final TypedRecord<T> command, final TypedResponseWriter responseWriter, final TypedStreamWriter streamWriter) { entityKey = command.getKey(); wrappedProcessor.onCommand(command, this); final boolean respond = command.getMetadata().hasRequestMetadata(); if (isAccepted) { streamWriter.appendFollowUpEvent(entityKey, newState, updatedValue); if (respond) { responseWriter.writeEventOnCommand(entityKey, newState, updatedValue, command); } } else { streamWriter.appendRejection(command, rejectionType, rejectionReason); if (respond) { responseWriter.writeRejectionOnCommand(command, rejectionType, rejectionReason); } } }
@Override public void processRecord( final TypedRecord<T> command, final TypedResponseWriter responseWriter, final TypedStreamWriter streamWriter) { entityKey = command.getKey(); wrappedProcessor.onCommand(command, this); final boolean respond = command.getMetadata().hasRequestMetadata(); if (isAccepted) { streamWriter.appendFollowUpEvent(entityKey, newState, updatedValue); if (respond) { responseWriter.writeEventOnCommand(entityKey, newState, updatedValue, command); } } else { streamWriter.appendRejection(command, rejectionType, rejectionReason); if (respond) { responseWriter.writeRejectionOnCommand(command, rejectionType, rejectionReason); } } }