|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bankframe.services.authentication.AuthenticationUtils
This class provides static utility methods for manipulating logon and logoff DataPackets.
Field Summary | |
static java.lang.String |
LOGOFF_FIELD_NAME
|
static java.lang.String |
LOGON_FIELD_NAME
|
static java.lang.String |
USER_ID
|
Constructor Summary | |
AuthenticationUtils()
|
Method Summary | |
static boolean |
checkIsLogoffPacket(DataPacket dp)
This method checks if a DataPacket is a logoff request. |
static boolean |
checkIsLogonPacket(DataPacket dp)
This method checks if the DataPacket is a logon request. |
static java.lang.String |
getUserId(DataPacket dp)
This method gets the userId field from a DataPacket (if it is present). |
static void |
makeLogoffPacket(DataPacket dp,
java.lang.String sessionId)
This method adds the data necessary for a logoff request to the specified DataPacket. |
static void |
makeLogonPacket(DataPacket dp)
This method adds the data necessary for a logon request to the specified DataPacket. |
static void |
putUserId(DataPacket dp,
java.lang.String userId)
This method puts a userId field into a DataPacket. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String LOGON_FIELD_NAME
public static final java.lang.String LOGOFF_FIELD_NAME
public static final java.lang.String USER_ID
Constructor Detail |
public AuthenticationUtils()
Method Detail |
public static boolean checkIsLogoffPacket(DataPacket dp)
dp
- the DataPacket to check
public static boolean checkIsLogonPacket(DataPacket dp)
dp
- the DataPacket to check
public static java.lang.String getUserId(DataPacket dp)
dp
- the DataPacket to extract userId from
public static void makeLogoffPacket(DataPacket dp, java.lang.String sessionId)
dp
- the DataPacket to add logoff request data tosessionId
- the Id of the user session to logoffpublic static void makeLogonPacket(DataPacket dp)
dp
- the DataPacket to add logon request data topublic static void putUserId(DataPacket dp, java.lang.String userId)
dp
- the DataPacket to insert userId into.userId
- the user id to insert into the DataPacket.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |