Package org.eclipse.jetty.client
Interface ProtocolHandler
-
- All Known Implementing Classes:
AuthenticationProtocolHandler,ContinueProtocolHandler,ProxyAuthenticationProtocolHandler,RedirectProtocolHandler,WWWAuthenticationProtocolHandler
@Deprecated(since="2021-05-27") public interface ProtocolHandlerDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.A protocol handler performs HTTP protocol operations on behalf of the application, typically like a browser would.
A typical example is handling HTTP redirects.
HttpClientcould just return the redirect response to the application, but the application would have to implement the redirect functionality (while browsers do this automatically).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanaccept(Request request, Response response)Deprecated.Inspects the givenrequestandresponseto detect whether this protocol handler should handle them.java.lang.StringgetName()Deprecated.Response.ListenergetResponseListener()Deprecated.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Deprecated.- Returns:
- a unique name among protocol handlers
-
accept
boolean accept(Request request, Response response)
Deprecated.Inspects the given
requestandresponseto detect whether this protocol handler should handle them.For example, a redirect protocol handler can inspect the response code and return true if it is a redirect response code.
This method is being called just after the response line has been parsed, and before the response headers are available.
- Parameters:
request- the request to acceptresponse- the response to accept- Returns:
- true if this protocol handler can handle the given request and response
-
getResponseListener
Response.Listener getResponseListener()
Deprecated.- Returns:
- a response listener that will handle the request and response on behalf of the application.
-
-