public class AppCookie
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static int |
APP_ID_BITS |
(package private) static int |
APP_ID_SHIFT |
(package private) static int |
USER_BITS |
(package private) static int |
USER_SHIFT |
Constructor and Description |
---|
AppCookie() |
Modifier and Type | Method and Description |
---|---|
static int |
extractApp(long cookie) |
static int |
extractUser(long cookie) |
static long |
makeCookie(int application,
int user)
Encapsulate an application ID and a user block of stuff into a cookie
|
static final int APP_ID_BITS
static final int APP_ID_SHIFT
static final int USER_BITS
static final int USER_SHIFT
public static long makeCookie(int application, int user)
application
- An ID to identify the applicationuser
- Some application specific datapublic static int extractApp(long cookie)
public static int extractUser(long cookie)