public class FingerprintsHelper extends AbstractAuthHelper
AUTH_VALUE_MAP_KEY, DEFAULT_LOCK_DELAY, DEFAULT_LOCK_TRY, DEFAULT_LOCK_WAIT, SERVER_ADDRESS_MAP_KEY, USER_NAME_MAP_KEY| Constructor and Description |
|---|
FingerprintsHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Fingerprint |
getFingerprint(java.lang.String serverAddress,
java.lang.String trustFilePath)
Get the first found fingerprint in the specified fingerprint file that
matches the specified server address.
|
static Fingerprint |
getFingerprint(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String trustFilePath)
Get the first found fingerprint in the specified trust file that matches
the specified user name and server address.
|
static Fingerprint[] |
getFingerprints(java.io.File trustFile)
Get all the fingerprints found in the specified file.
|
static Fingerprint[] |
getFingerprints(java.lang.String trustFilePath)
Get all the fingerprints found in the file at the specified file path.
|
static java.lang.String |
getFingerprintValue(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String trustFilePath)
Get the first found fingerprint value that matches the specified user
name and server address.
|
static void |
saveFingerprint(Fingerprint fingerprint,
java.io.File trustFile)
Save the specified fingerprint as an entry into the specified trust file.
|
static void |
saveFingerprint(Fingerprint fingerprint,
java.lang.String trustFilePath)
Save the specified fingerprint as an entry into the specified trust file.
|
static void |
saveFingerprint(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String fingerprintValue,
java.io.File trustFile)
Save the specified parameters as an entry into the specified trust file.
|
static void |
saveFingerprint(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String fingerprintValue,
java.io.File trustFile,
int lockTry,
long lockDelay,
long lockWait)
Save the specified parameters as an entry into the specified trust file.
|
static void |
saveFingerprint(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String fingerprintValue,
java.lang.String trustFilePath)
Save the specified parameters as an entry into the specified trust file.
|
static void |
saveFingerprint(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String fingerprintValue,
java.lang.String trustFilePath,
int lockTry,
long lockDelay,
long lockWait)
Save the specified parameters as an entry into the specified trust file.
|
getFileEntries, getMemoryEntries, getMemoryEntry, saveFileEntry, saveMemoryEntrypublic static java.lang.String getFingerprintValue(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String trustFilePath)
throws java.io.IOException
userName - serverAddress - trustFilePath - java.io.IOException - - io exception from reading trust filepublic static Fingerprint[] getFingerprints(java.lang.String trustFilePath) throws java.io.IOException
trustFilePath - java.io.IOException - - io exception from reading trust filepublic static Fingerprint[] getFingerprints(java.io.File trustFile) throws java.io.IOException
trustFile - java.io.IOException - - io exception from reading trust filepublic static Fingerprint getFingerprint(java.lang.String userName, java.lang.String serverAddress, java.lang.String trustFilePath) throws java.io.IOException
userName - - possibly null user name to match against the found
fingerprintsserverAddress - - non-null server addresstrustFilePath - - path to trust file to searchjava.io.IOException - - io exception from reading trust filepublic static Fingerprint getFingerprint(java.lang.String serverAddress, java.lang.String trustFilePath) throws java.io.IOException
serverAddress - - non-null server addresstrustFilePath - - path to trust file to searchjava.io.IOException - - io exception from reading trust filepublic static void saveFingerprint(Fingerprint fingerprint, java.lang.String trustFilePath) throws java.io.IOException
fingerprint - - non-null fingerprinttrustFilePath - - non-null pathjava.io.IOExceptionpublic static void saveFingerprint(Fingerprint fingerprint, java.io.File trustFile) throws java.io.IOException
fingerprint - - non-null fingerprinttrustFile - - non-null filejava.io.IOExceptionpublic static void saveFingerprint(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String fingerprintValue,
java.lang.String trustFilePath)
throws java.io.IOException
userName - - non-null user nameserverAddress - - non-null server addressfingerprintValue - - non-null fingerprint valuetrustFilePath - - non-null file pathjava.io.IOExceptionpublic static void saveFingerprint(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String fingerprintValue,
java.lang.String trustFilePath,
int lockTry,
long lockDelay,
long lockWait)
throws java.io.IOException
userName - - non-null user nameserverAddress - - non-null server addressfingerprintValue - - non-null fingerprint valuetrustFilePath - - non-null file pathlockTry - - number of tries for lockinglockDelay - - delay time (ms) for lockinglockWait - - wait time (ms) for other process/thread to finish lockingjava.io.IOExceptionpublic static void saveFingerprint(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String fingerprintValue,
java.io.File trustFile)
throws java.io.IOException
userName - - non-null user nameserverAddress - - non-null server addressfingerprintValue - - possibly null fingerprint valuetrustFile - - non-null filejava.io.IOExceptionpublic static void saveFingerprint(java.lang.String userName,
java.lang.String serverAddress,
java.lang.String fingerprintValue,
java.io.File trustFile,
int lockTry,
long lockDelay,
long lockWait)
throws java.io.IOException
userName - - non-null user nameserverAddress - - non-null server addressfingerprintValue - - possibly null fingerprint valuetrustFile - - non-null filelockTry - - number of tries for lockinglockDelay - - delay time (ms) for lockinglockWait - - wait time (ms) for other process/thread to finish lockingjava.io.IOExceptionCopyright © 2022 Perforce Software. All Rights Reserved.