|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.perforce.p4java.server.AbstractAuthHelper
com.perforce.p4java.server.AuthTicketsHelper
public class AuthTicketsHelper
This class is designed to lookup authentication tickets from a tickets file or the in-memory tickets map. If a null tickets file parameter is passed to the methods, the in-memory tickets map will be used instead.
| Field Summary |
|---|
| Fields inherited from class com.perforce.p4java.server.AbstractAuthHelper |
|---|
AUTH_VALUE_MAP_KEY, DEFAULT_LOCK_DELAY, DEFAULT_LOCK_TRY, DEFAULT_LOCK_WAIT, SERVER_ADDRESS_MAP_KEY, USER_NAME_MAP_KEY |
| Constructor Summary | |
|---|---|
AuthTicketsHelper()
|
|
| Method Summary | |
|---|---|
static AuthTicket |
getTicket(String serverAddress,
String ticketsFilePath)
Get the first found ticket in the specified ticket file that matches the specified server address. |
static AuthTicket |
getTicket(String userName,
String serverAddress,
String ticketsFilePath)
Get the first found ticket in the specified ticket file that matches the specified user name and server address. |
static AuthTicket[] |
getTickets(File ticketsFile)
Get all the tickets found in the specified file. |
static AuthTicket[] |
getTickets(String ticketsFilePath)
Get all the tickets found in the file at the specified file path. |
static String |
getTicketValue(String userName,
String serverAddress,
String ticketsFilePath)
Get the first found ticket value that matches the specified user name and server address. |
static void |
saveTicket(AuthTicket ticket,
File ticketsFile)
Save the specified ticket as an entry into the specified tickets file. |
static void |
saveTicket(AuthTicket ticket,
String ticketsFilePath)
Save the specified ticket as an entry into the specified tickets file. |
static void |
saveTicket(String userName,
String serverAddress,
String ticketValue,
File ticketsFile)
Save the specified parameters as an entry into the specified tickets file. |
static void |
saveTicket(String userName,
String serverAddress,
String ticketValue,
File ticketsFile,
int lockTry,
long lockDelay,
long lockWait)
Save the specified parameters as an entry into the specified tickets file. |
static void |
saveTicket(String userName,
String serverAddress,
String ticketValue,
String ticketsFilePath)
Save the specified parameters as an entry into the specified tickets file. |
static void |
saveTicket(String userName,
String serverAddress,
String ticketValue,
String ticketsFilePath,
int lockTry,
long lockDelay,
long lockWait)
Save the specified parameters as an entry into the specified tickets file. |
| Methods inherited from class com.perforce.p4java.server.AbstractAuthHelper |
|---|
getFileEntries, getMemoryEntries, getMemoryEntry, saveFileEntry, saveMemoryEntry |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthTicketsHelper()
| Method Detail |
|---|
public static String getTicketValue(String userName,
String serverAddress,
String ticketsFilePath)
throws IOException
userName - serverAddress - ticketsFilePath -
IOException - - io exception from reading tickets file
public static AuthTicket[] getTickets(String ticketsFilePath)
throws IOException
ticketsFilePath -
IOException - - io exception from reading tickets file
public static AuthTicket[] getTickets(File ticketsFile)
throws IOException
ticketsFile -
IOException - - io exception from reading tickets file
public static AuthTicket getTicket(String userName,
String serverAddress,
String ticketsFilePath)
throws IOException
userName - - possibly null user name to match against the found ticketsserverAddress - - non-null server addressticketsFilePath - - path to tickets file to search
IOException - - io exception from reading tickets file
public static AuthTicket getTicket(String serverAddress,
String ticketsFilePath)
throws IOException
serverAddress - - non-null server addressticketsFilePath - - path to tickets file to search
IOException - - io exception from reading tickets file
public static void saveTicket(AuthTicket ticket,
String ticketsFilePath)
throws IOException
ticket - - non-null ticketticketsFilePath - - non-null path
IOException
public static void saveTicket(AuthTicket ticket,
File ticketsFile)
throws IOException
ticket - - non-null ticketticketsFile - - non-null file
IOException
public static void saveTicket(String userName,
String serverAddress,
String ticketValue,
String ticketsFilePath)
throws IOException
userName - - non-null user nameserverAddress - - non-null server addressticketValue - - non-null ticket valueticketsFilePath - - non-null file path
IOException
public static void saveTicket(String userName,
String serverAddress,
String ticketValue,
String ticketsFilePath,
int lockTry,
long lockDelay,
long lockWait)
throws IOException
userName - - non-null user nameserverAddress - - non-null server addressticketValue - - non-null ticket valueticketsFilePath - - non-null file pathlockTry - - number of tries for lockinglockDelay - - delay time (ms) for lockinglockWait - - wait time (ms) for other process/thread to finish locking
IOException
public static void saveTicket(String userName,
String serverAddress,
String ticketValue,
File ticketsFile)
throws IOException
userName - - non-null user nameserverAddress - - non-null server addressticketValue - - possibly null ticket valueticketsFile - - non-null file
IOException
public static void saveTicket(String userName,
String serverAddress,
String ticketValue,
File ticketsFile,
int lockTry,
long lockDelay,
long lockWait)
throws IOException
userName - - non-null user nameserverAddress - - non-null server addressticketValue - - possibly null ticket valueticketsFile - - non-null filelockTry - - number of tries for lockinglockDelay - - delay time (ms) for lockinglockWait - - wait time (ms) for other process/thread to finish locking
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||