-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WEJBHTTP-139] Final round of cleanup refactorings accross all modules #259
base: main
Are you sure you want to change the base?
Conversation
…reams unflushable
… ejb/Utils to common/Utils
…erviceConfig be the first parameter
…ut() instead of HeaderMap.add()
…ter code readability
… code readability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, looks fine although there is some disagreement about removing context from variable names :-)
@@ -42,6 +42,9 @@ final class Constants { | |||
// context path | |||
static final String TXN_CONTEXT = "/txn"; | |||
|
|||
// params | |||
static final String OPC_QUERY_PARAMETER = "opc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This string literal doesn't say much to me. A query parameter called "onePhase" would be more descriptive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change that in future versions of the protocol. We have to keep that name now for backward compatibility.
common/src/main/java/org/wildfly/httpclient/common/HeadersHelper.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/wildfly/httpclient/common/HeadersHelper.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/wildfly/httpclient/common/HeadersHelper.java
Outdated
Show resolved
Hide resolved
ejb/src/main/java/org/wildfly/httpclient/ejb/RequestBuilder.java
Outdated
Show resolved
Hide resolved
ejb/src/main/java/org/wildfly/httpclient/ejb/ClientHandlers.java
Outdated
Show resolved
Hide resolved
@@ -73,4 +77,38 @@ public void write(final byte[] b, final int off, final int len) throws IOExcepti | |||
|
|||
} | |||
|
|||
private static final class UnflushableByteOutput implements ByteOutput { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Motivation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the way this protocol was implemented. Output is always sent at once to prevent fragmentation on the wire.
I maintained it for backward compatibility. For future version of the protocol we could revisit it if its really necessary.
…legalArgumentException if HeadersHelper method parameter is null
… 'output' variable names for ObjectInput and ObjectOutput
…t and long as method parameters in HeadersHelper
…tead of txn for TransactionInfo parameter names
https://issues.redhat.com/browse/WEJBHTTP-139