public final class ChannelUpgradeHandler extends Object implements HttpHandler
Constructor and Description |
---|
ChannelUpgradeHandler() |
Modifier and Type | Method and Description |
---|---|
void | addProtocol(String productString, org.xnio.ChannelListener<? super org.xnio.StreamConnection> openListener) Add a protocol to this handler. |
void | addProtocol(String productString, org.xnio.ChannelListener<? super org.xnio.StreamConnection> openListener, HttpUpgradeHandshake handshake) Add a protocol to this handler. |
HttpHandler | getNonUpgradeHandler() Get the non-upgrade delegate handler. |
void | handleRequest(HttpServerExchange exchange) Handle the request. |
void | removeProtocol(String productString) Remove a protocol from this handler. |
void | removeProtocol(String productString, org.xnio.ChannelListener<? super org.xnio.StreamConnection> openListener) Remove a protocol from this handler. |
ChannelUpgradeHandler | setNonUpgradeHandler(HttpHandler nonUpgradeHandler) Set the non-upgrade delegate handler. |
public void addProtocol(String productString, org.xnio.ChannelListener<? super org.xnio.StreamConnection> openListener, HttpUpgradeHandshake handshake)
productString
- the product string to matchopenListener
- the open listener to callhandshake
- a handshake implementation that can be used to verify the client request and modify the responsepublic void addProtocol(String productString, org.xnio.ChannelListener<? super org.xnio.StreamConnection> openListener)
productString
- the product string to matchopenListener
- the open listener to callpublic void removeProtocol(String productString)
productString
- the product string to matchpublic void removeProtocol(String productString, org.xnio.ChannelListener<? super org.xnio.StreamConnection> openListener)
productString
- the product string to matchopenListener
- The open listenerpublic HttpHandler getNonUpgradeHandler()
public ChannelUpgradeHandler setNonUpgradeHandler(HttpHandler nonUpgradeHandler)
nonUpgradeHandler
- the non-upgrade delegate handlerpublic void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
Copyright © 2015 JBoss by Red Hat. All rights reserved.