public void onSuccess(Method method, String response) {
if (method.getResponse().getStatusCode() == Response.SC_OK) {
List<String> roles = helper.readRoles(response);
handler.onResponse(roles);
} else {
bus.fireEvent(new UserIsLoggedOutEvent());
}
}
@Override
public void onFailure(Method method, Throwable exception) {
bus.fireEvent(new UserIsLoggedOutEvent());
}
});
}