use of me.semx11.autotip.api.reply.impl.LogoutReply in project Hyperium by HyperiumClient.
the class LogoutRequest method execute.
@Override
public LogoutReply execute() {
HttpUriRequest request = GetBuilder.of(this).addParameter("key", sessionKey).build();
Optional<Reply> optional = RequestHandler.getReply(this, request.getURI());
return optional.map(reply -> (LogoutReply) reply).orElseGet(() -> new LogoutReply(false));
}
use of me.semx11.autotip.api.reply.impl.LogoutReply in project Hyperium by HyperiumClient.
the class SessionManager method logout.
public void logout() {
if (!loggedIn)
return;
LogoutReply reply = LogoutRequest.of(sessionKey).execute();
if (!reply.isSuccess()) {
Autotip.LOGGER.warn("Error during logout: {}", reply.getCause());
}
loggedIn = false;
sessionKey = null;
taskManager.cancelTask(TaskType.KEEP_ALIVE);
tipQueue.clear();
}
Aggregations