本文整理汇总了Java中com.box.boxjavalibv2.events.OAuthEvent类的典型用法代码示例。如果您正苦于以下问题:Java OAuthEvent类的具体用法?Java OAuthEvent怎么用?Java OAuthEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OAuthEvent类属于com.box.boxjavalibv2.events包,在下文中一共展示了OAuthEvent类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: exitSuccess
import com.box.boxjavalibv2.events.OAuthEvent; //导入依赖的package包/类
private void exitSuccess(final BoxOAuthToken token) {
Platform.runLater(new Runnable() {
@Override
public void run() {
try {
oauthListener.onAuthFlowEvent(OAuthEvent.OAUTH_CREATED, new OAuthDataMessage(token));
}
catch (BoxRestException e) {
oauthListener.onAuthFlowException(e);
}
Platform.exit();
}
});
}
示例2: onAuthFlowEvent
import com.box.boxjavalibv2.events.OAuthEvent; //导入依赖的package包/类
@Override
public void onAuthFlowEvent(IAuthEvent state, IAuthFlowMessage message) {
// check success
if (state == OAuthEvent.OAUTH_CREATED) {
LOG.debug("OAuth succeeded");
latch.countDown();
}
}
示例3: onPageStarted
import com.box.boxjavalibv2.events.OAuthEvent; //导入依赖的package包/类
@Override
public void onPageStarted(final WebView view, final String url, final Bitmap favicon) {
for (IAuthFlowListener listener : mListeners) {
if (listener != null) {
listener.onAuthFlowEvent(OAuthEvent.PAGE_STARTED, new StringMessage(StringMessage.MESSAGE_URL, url));
}
}
}
示例4: onAuthFlowEvent
import com.box.boxjavalibv2.events.OAuthEvent; //导入依赖的package包/类
@Override
public void onAuthFlowEvent(IAuthEvent event, IAuthFlowMessage message) {
OAuthEvent oe = (OAuthEvent) event;
if (oe == OAuthEvent.OAUTH_CREATED) {
((OAuthAuthorization) getAuth()).setOAuthData(getOAuthTokenFromMessage(message));
}
if (mAuthListener != null) {
mAuthListener.onAuthFlowEvent(event, message);
}
}
示例5: onPageFinished
import com.box.boxjavalibv2.events.OAuthEvent; //导入依赖的package包/类
@Override
public void onPageFinished(final WebView view, final String url) {
fireEvents(OAuthEvent.PAGE_FINISHED, new StringMessage(StringMessage.MESSAGE_URL, url));
}