public abstract class AbstractAuthHelper extends Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
AbstractAuthHelper() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final int DEFAULT_LOCK_TRY
public static final long DEFAULT_LOCK_DELAY
public static final long DEFAULT_LOCK_WAIT
protected static final String SERVER_ADDRESS_MAP_KEY
protected static final String USER_NAME_MAP_KEY
protected static final String AUTH_VALUE_MAP_KEY
protected static Map<String,String> getMemoryEntry(String userName, String serverAddress, Map<String,String> authMap)
protected static List<Map<String,String>> getMemoryEntries(Map<String,String> 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
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 fileIOException
Copyright © 2017 Perforce Software. All Rights Reserved.