Class UpgradeProtocolHandler
java.lang.Object
org.eclipse.jetty.client.UpgradeProtocolHandler
- All Implemented Interfaces:
ProtocolHandler
A protocol handler that handles HTTP 101 responses.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanInspects the givenrequestandresponseto detect whether this protocol handler should handle them.protected booleanacceptHeaders(Request request, Response response) getName()Get a unique name among protocol handlers.
-
Constructor Details
-
UpgradeProtocolHandler
public UpgradeProtocolHandler()
-
-
Method Details
-
getName
Description copied from interface:ProtocolHandlerGet a unique name among protocol handlers.- Specified by:
getNamein interfaceProtocolHandler- Returns:
- a unique name among protocol handlers
-
accept
Description copied from interface:ProtocolHandlerInspects 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.
- Specified by:
acceptin interfaceProtocolHandler- Parameters:
request- the request to acceptresponse- the response to accept- Returns:
- true if this protocol handler can handle the given request and response
-
acceptHeaders
-
getResponseListener
- Specified by:
getResponseListenerin interfaceProtocolHandler- Returns:
- a response listener that will handle the request and response on behalf of the application.
-