A HttpUpgrader that upgrades to a given protocol.
Works in conjunction with HttpClientTransportDynamic
so that the protocol to upgrade to must be one of the application
protocols supported by HttpClientTransportDynamic.
| Modifier and Type | Field and Description |
|---|---|
| private final HttpDestination | |
| private static final Logger | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | prepare(Request
the request to prepare request)Implements org. Prepares the request for the upgrade, for example by setting the HTTP method or by setting HTTP headers required for the upgrade. |
| public void | upgrade(Response
the response with the information about the upgrade response, EndPoint the EndPoint to upgrade endPoint, Callback a callback to notify of the success or failure of the upgrade callback)Implements org. Upgrades the given |
| destination | back to summary |
|---|---|
| private final HttpDestination destination | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| protocol | back to summary |
|---|---|
| private final String protocol | |
| ProtocolHttpUpgrader | back to summary |
|---|---|
| public ProtocolHttpUpgrader(HttpDestination destination, String protocol) | |
| prepare | back to summary |
|---|---|
| public void prepare(Request request) Implements org. Doc from org. Prepares the request for the upgrade, for example by setting the HTTP method or by setting HTTP headers required for the upgrade. | |
| upgrade | back to summary |
|---|---|
| public void upgrade(Response response, EndPoint endPoint, Callback callback) Implements org. Doc from org. Upgrades the given The success or failure of the upgrade should be communicated via the given An exception thrown by this method is equivalent to failing the callback. | |