-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Issue #3730 - Cleaning up Scopes in WebSocketClient #4423
Issue #3730 - Cleaning up Scopes in WebSocketClient #4423
Conversation
+ Introducing HttpContainerScope to track HttpClient specific ByteBufferPool, SslContextFactory, and Executor. + New private WebSocketClient constructor that use HttpContainerScope + Deprecated many constructors as irrelevant now that HttpClient is an option to create a WebSocketClient. Signed-off-by: Joakim Erdfelt <[email protected]>
...ocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java
Show resolved
Hide resolved
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.
Looks good, just have a few clean up suggestions.
...ocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java
Outdated
Show resolved
Hide resolved
...ocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java
Outdated
Show resolved
Hide resolved
this((HttpClient)null); | ||
this(new HttpContainerScope(HttpClientProvider.get(null))); | ||
// Add as bean, as HttpClient was created in this class | ||
addBean(this.httpClient); |
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 call to add the HttpClient
as a bean is repeated in every constructor, while it should only be in the newly introduced constructor.
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.
Nope, that's incorrect, there are 2 paths that have external clients.
Can't do that in the common constructor.
...ocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt [email protected]
Closes #3730