|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bankframe.services.authentication.AuthenticationUtils
public class AuthenticationUtils
This class provides static utility methods for manipulating logon and logoff DataPackets.
Field Summary | |
---|---|
static String |
LOGOFF_FIELD_NAME
|
static String |
LOGON_FIELD_NAME
|
static 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 String |
getUserId(DataPacket dp)
This method gets the userId field from a DataPacket (if it is present). |
static void |
makeLogoffPacket(DataPacket dp,
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,
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 String LOGON_FIELD_NAME
public static final String LOGOFF_FIELD_NAME
public static final 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 String getUserId(DataPacket dp)
dp
- the DataPacket to extract userId from
public static void makeLogoffPacket(DataPacket dp, 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, 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 |