-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #11031 - HttpClient should expose Connection/EndPoint used by H… (
#11033) Introduced method Request.getConnection() to expose the Connection after at the request begin event. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
- Loading branch information
Showing
15 changed files
with
202 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
package org.eclipse.jetty.client.api; | ||
|
||
import java.io.Closeable; | ||
import java.net.SocketAddress; | ||
|
||
import org.eclipse.jetty.util.Promise; | ||
|
||
|
@@ -46,4 +47,20 @@ public interface Connection extends Closeable | |
* @see #close() | ||
*/ | ||
boolean isClosed(); | ||
|
||
/** | ||
* @return the local socket address associated with the connection | ||
Check warning on line 52 in jetty-client/src/main/java/org/eclipse/jetty/client/api/Connection.java Webtide Jenkins / Static Analysis jdk17MissingSummary
Raw output
|
||
*/ | ||
default SocketAddress getLocalSocketAddress() | ||
{ | ||
return null; | ||
} | ||
|
||
/** | ||
* @return the remote socket address associated with the connection | ||
Check warning on line 60 in jetty-client/src/main/java/org/eclipse/jetty/client/api/Connection.java Webtide Jenkins / Static Analysis jdk17MissingSummary
Raw output
|
||
*/ | ||
default SocketAddress getRemoteSocketAddress() | ||
{ | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,22 @@ | |
*/ | ||
public interface Request | ||
{ | ||
/** | ||
* <p>Returns the connection associated with this request.</p> | ||
* <p>The connection is available only starting from the | ||
* {@link #onRequestBegin(BeginListener) request begin} event, | ||
* when a connection is associated with the request to be sent, | ||
* otherwise {@code null} is returned.</p> | ||
* | ||
* @return the connection associated with this request, | ||
* or {@code null} if there is no connection associated | ||
* with this request | ||
*/ | ||
default Connection getConnection() | ||
{ | ||
return null; | ||
} | ||
|
||
/** | ||
* @return the URI scheme of this request, such as "http" or "https" | ||
Check warning on line 70 in jetty-client/src/main/java/org/eclipse/jetty/client/api/Request.java Webtide Jenkins / Static Analysis jdk17MissingSummary
Raw output
|
||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.