Package org.apache.coyote
Interface UpgradeProtocol
- All Known Implementing Classes:
- Http2Protocol
public interface UpgradeProtocol
- 
Method SummaryModifier and TypeMethodDescriptionbooleanAllows the implementation to examine the request and accept or reject it based on what it finds.byte[]getHttpUpgradeName(boolean isSSLEnabled) getInternalUpgradeHandler(Adapter adapter, Request request) getProcessor(SocketWrapperBase<?> socketWrapper, Adapter adapter) 
- 
Method Details- 
getHttpUpgradeName- Parameters:
- isSSLEnabled- Is this for a connector that is configured to support TLS. Some protocols (e.g. HTTP/2) only support HTTP upgrade over non-secure connections.
- Returns:
- The name that clients will use to request an upgrade to this protocol via an HTTP/1.1 upgrade request or
             nullif upgrade via an HTTP/1.1 upgrade request is not supported.
 
- 
getAlpnIdentifierbyte[] getAlpnIdentifier()- Returns:
- The byte sequence as listed in the IANA registry for this protocol or nullif upgrade via ALPN is not supported.
 
- 
getAlpnNameString getAlpnName()- Returns:
- The name of the protocol as listed in the IANA registry if and only if getAlpnIdentifier()returns the UTF-8 encoding of this name. IfgetAlpnIdentifier()returns some other byte sequence, then this method returns the empty string. If upgrade via ALPN is not supported thennullis returned.
 
- 
getProcessor- Parameters:
- socketWrapper- The socketWrapper for the connection that requires a processor
- adapter- The Adapter instance that provides access to the standard Engine/Host/Context/Wrapper processing chain
- Returns:
- A processor instance for processing a connection using this protocol.
 
- 
getInternalUpgradeHandler- Parameters:
- adapter- The Adapter to use to configure the new upgrade handler
- request- A copy (may be incomplete) of the request that triggered the upgrade
- Returns:
- An instance of the HTTP upgrade handler for this protocol
 
- 
acceptAllows the implementation to examine the request and accept or reject it based on what it finds.- Parameters:
- request- The request that included an upgrade header for this protocol
- Returns:
- trueif the request is accepted, otherwise- false
 
 
-