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
 void onFailure(Throwable t)
          If the upgrade fail.
 void onSuccess(T t)
          If the HTTP Upgrade succeed (response's status code equals 101), the AsyncHttpProvider will invoke that method
 

Method Detail

onSuccess

void onSuccess(T t)
If the HTTP Upgrade succeed (response's status code equals 101), the AsyncHttpProvider will invoke that method

Parameters:
t - an Upgradable entity

onFailure

void onFailure(Throwable t)
If the upgrade fail.

Parameters:
t - a Throwable


Copyright © 2014. All Rights Reserved.