public abstract class MeResponseCallback extends UserProfileResponseCallback
UserManagement.requestMe(MeResponseCallback)
) 호출할 때 넘겨주고 콜백을 받는다.Handler.Callback
Constructor and Description |
---|
MeResponseCallback() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
onFailure(APIErrorResult errorResult)
사용자 가입이 안된 상태(
onNotSignedUp() ) 또는 세션이 닫힌 경우(onSessionClosedFailure(com.kakao.APIErrorResult) )를 제외한 이유로 사용자정보 요청이 실패한 경우
아래 에러 종류에 따라 적절한 처리를 한다. |
protected void |
onHttpFailure(APIErrorResult errorResult)
HttpResponseHandler 를 구현한 것으로 사용자정보 요청 중에 서버에서 요청을 수행하지 못했다는 결과를 받았을 때 호출된다. |
protected void |
onHttpSessionClosedFailure(APIErrorResult errorResult)
HttpResponseHandler 를 구현한 것으로 사용자정보 요청 전 또는 요청 중에 세션이 닫혀 로그인이 필요할 때 호출된다. |
protected abstract void |
onNotSignedUp()
세션 오픈은 성공했으나 사용자 정보 요청 결과 사용자 가입이 안된 상태로
일반적으로 가입창으로 이동한다.
|
protected abstract void |
onSessionClosedFailure(APIErrorResult errorResult)
사용자정보 요청 전이나 요청 중가 세션이 닫힌 경우로
일반적으로 로그인 창으로 이동한다.
|
protected abstract void |
onSuccess(UserProfile userProfile)
로그인을 성공적으로 마친 경우로
일반적으로 로그인창으로 이동하도록 구현한다.
|
protected void |
onSuccessUserProfile(UserProfile userProfile)
UserResponseCallback 을 구현한 것으로 사용자정보 요청이 성공했을 때 호출된다. |
onHttpSuccess
dispatchMessage, dump, getLooper, getMessageName, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString
protected abstract void onSuccess(UserProfile userProfile)
userProfile
- 로그인 성공된 사용자의 프로필 정보protected abstract void onNotSignedUp()
protected abstract void onSessionClosedFailure(APIErrorResult errorResult)
errorResult
- 세션이 닫힌 이유protected abstract void onFailure(APIErrorResult errorResult)
onNotSignedUp()
) 또는 세션이 닫힌 경우(onSessionClosedFailure(com.kakao.APIErrorResult)
)를 제외한 이유로 사용자정보 요청이 실패한 경우
아래 에러 종류에 따라 적절한 처리를 한다. ErrorCode.INVALID_PARAM_CODE
, ErrorCode.INVALID_SCOPE_CODE
,ErrorCode.NOT_SUPPORTED_API_CODE
, ErrorCode.INTERNAL_ERROR_CODE
, ErrorCode.NOT_REGISTERED_PROPERTY_KEY_CODE
,ErrorCode.CLIENT_ERROR_CODE
, ErrorCode.EXCEED_LIMIT_CODE
, ErrorCode.KAKAO_MAINTENANCE_CODE
errorResult
- 실패한 이유protected void onSuccessUserProfile(UserProfile userProfile)
UserResponseCallback
을 구현한 것으로 사용자정보 요청이 성공했을 때 호출된다.
사용자 정보를 캐싱하고 사용자 콜백 onSuccess(UserProfile)
를 호출한다.
결과 USerProfile이 비정상이면 에러 처리한다.onSuccessUserProfile
in class UserProfileResponseCallback
userProfile
- User API의 성공 결과로 요청 유저의 정보protected void onHttpSessionClosedFailure(APIErrorResult errorResult)
HttpResponseHandler
를 구현한 것으로 사용자정보 요청 전 또는 요청 중에 세션이 닫혀 로그인이 필요할 때 호출된다.
사용자 콜백 onSessionClosedFailure(APIErrorResult)
을 호출한다.onHttpSessionClosedFailure
in class com.kakao.http.HttpResponseHandler<Map>
errorResult
- 세션이 닫히 계기protected void onHttpFailure(APIErrorResult errorResult)
HttpResponseHandler
를 구현한 것으로 사용자정보 요청 중에 서버에서 요청을 수행하지 못했다는 결과를 받았을 때 호출된다.
가입이 안된 경우라면 onNotSignedUp()
을 호출하고, 그외의 경우 세션의 상태에 따라 onSessionClosedFailure(APIErrorResult)
콜백 또는 onFailure(APIErrorResult)
} 콜백을 호출한다.onHttpFailure
in class com.kakao.http.HttpResponseHandler<Map>
errorResult
- 실패한 결과Copyright © 2014 Kakao Corp. All rights reserved.