|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.perforce.p4java.server.AbstractAuthHelper
public abstract class AbstractAuthHelper
This super class is designed to lookup auth entries from file or memory.
Field Summary | |
---|---|
protected static String |
AUTH_VALUE_MAP_KEY
|
static long |
DEFAULT_LOCK_DELAY
|
static int |
DEFAULT_LOCK_TRY
|
static long |
DEFAULT_LOCK_WAIT
|
protected static String |
SERVER_ADDRESS_MAP_KEY
|
protected static String |
USER_NAME_MAP_KEY
|
Constructor Summary | |
---|---|
AbstractAuthHelper()
|
Method Summary | |
---|---|
protected static List<Map<String,String>> |
getFileEntries(File authFile)
Get all the auth entries found in the specified auth file. |
protected static List<Map<String,String>> |
getMemoryEntries(Map<String,String> authMap)
Get all the auth entries found in the specified auth store in memory. |
protected static Map<String,String> |
getMemoryEntry(String userName,
String serverAddress,
Map<String,String> authMap)
Get the auth entry in the specified auth map that matches the specified user name and server address. |
protected static void |
saveFileEntry(String userName,
String serverAddress,
String authValue,
File authFile,
int lockTry,
long lockDelay,
long lockWait)
Save the specified parameters as an entry into the specified auth file. |
protected static void |
saveMemoryEntry(String userName,
String serverAddress,
String authValue,
Map<String,String> authMap)
Save the specified parameters as an entry into the specified auth map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String SERVER_ADDRESS_MAP_KEY
protected static final String USER_NAME_MAP_KEY
protected static final String AUTH_VALUE_MAP_KEY
public static final int DEFAULT_LOCK_TRY
public static final long DEFAULT_LOCK_DELAY
public static final long DEFAULT_LOCK_WAIT
Constructor Detail |
---|
public AbstractAuthHelper()
Method Detail |
---|
protected static Map<String,String> getMemoryEntry(String userName, String serverAddress, Map<String,String> authMap)
authMap
-
protected static List<Map<String,String>> getMemoryEntries(Map<String,String> authMap)
authMap
-
protected static void saveMemoryEntry(String userName, String serverAddress, String authValue, Map<String,String> authMap)
userName
- - non-null user nameserverAddress
- - non-null server addressauthValue
- - possibly null auth valueauthMap
- - non-null auth mapprotected static List<Map<String,String>> getFileEntries(File authFile) throws IOException
authFile
-
IOException
- - io exception from reading auth fileprotected static void saveFileEntry(String userName, String serverAddress, String authValue, File authFile, int lockTry, long lockDelay, long lockWait) throws IOException
userName
- - non-null user nameserverAddress
- - non-null server addressauthValue
- - possibly null auth valueauthFile
- - non-null file
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |