Package com.ning.http.client
Interface UpgradeHandler<T>
- Type Parameters:
T-
- All Known Implementing Classes:
WebSocketUpgradeHandler
public interface UpgradeHandler<T>
Invoked when an
AsyncHandler.STATE.UPGRADE is returned. Currently the library only support WebSocket
as type.-
Method Summary
Modifier and TypeMethodDescriptionvoidIf the upgrade fail.voidIf the HTTP Upgrade succeed (response's status code equals 101), theAsyncHttpProviderwill invoke that method
-
Method Details
-
onSuccess
If the HTTP Upgrade succeed (response's status code equals 101), theAsyncHttpProviderwill invoke that method- Parameters:
t- an Upgradable entity
-
onFailure
If the upgrade fail.- Parameters:
t- aThrowable
-