Add RequestContext to simplify creation of Request which requires SessionId and RequestId #201
Reference in New Issue
Block a user
Delete Branch "feat/request-context-record"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Added
RequestContextrecord to containSessionIdandRequestId.Added
RawRequestto serve as an intermediate object between parsing and creation of thePrimitiveRequest.Refactored
ProtocolParserto take a payload string and returnRawRequest.Refactored
PrimitiveRequestandRequestto containRequestContext. Added getter methods toRequest.The reason for the refactoring and addition of a new intermediate type was the issue with
PrimitiveRequestbeing immutable after creation.Options were either to:
PrimitiveRequestto be a class. Subsequently, the RequestContext could be provided via a setter method.ProtocolParser. TheSessionReaderwill then instantiate thePrimitiveRequestbefore calling theCommandParserDispatcher.I opted for the second approach, as it was, in my eyes, the cleanest.
Closes #12
mentioned in commit
4234149b58