Package org.jenkinsci.plugins.p4.client
Class SessionHelper
- java.lang.Object
-
- org.jenkinsci.plugins.p4.client.CredentialsHelper
-
- org.jenkinsci.plugins.p4.client.SessionHelper
-
- Direct Known Subclasses:
ConnectionHelper
public class SessionHelper extends CredentialsHelper
-
-
Constructor Summary
Constructors Constructor Description SessionHelper(String credentialID, TaskListener listener)
SessionHelper(P4BaseCredentials credential, TaskListener listener)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort()
boolean
checkVersion(int min)
Checks the Perforce server version number and returns true if greater than or equal to the min version.protected void
disconnect()
Disconnect from the Perforce Server.com.perforce.p4java.server.IOptionsServer
getConnection()
PerforceScm.DescriptorImpl
getP4SCM()
String
getTicket()
String
getTrust()
Validate
getValidate()
boolean
hasAborted()
void
invalidateSession()
static void
invalidateSession(String user)
Remove all entries for a specific user.boolean
isConnected()
boolean
isUnicode()
boolean
login()
void
logout()
-
Methods inherited from class org.jenkinsci.plugins.p4.client.CredentialsHelper
findCredential, findCredential, findCredential, findCredential, getAuthorisationConfig, getCredential, getListener, getPort, getRetry, getTick, getUser, log
-
-
-
-
Constructor Detail
-
SessionHelper
public SessionHelper(P4BaseCredentials credential, TaskListener listener) throws IOException
- Throws:
IOException
-
SessionHelper
public SessionHelper(String credentialID, TaskListener listener) throws IOException
- Throws:
IOException
-
-
Method Detail
-
invalidateSession
public void invalidateSession()
-
invalidateSession
public static void invalidateSession(String user)
Remove all entries for a specific user.- Parameters:
user
- p4user
-
getConnection
public com.perforce.p4java.server.IOptionsServer getConnection()
-
getValidate
public Validate getValidate()
-
getTicket
public String getTicket()
-
isConnected
public boolean isConnected()
-
isUnicode
public boolean isUnicode() throws com.perforce.p4java.exception.ConnectionException, com.perforce.p4java.exception.AccessException, com.perforce.p4java.exception.RequestException
- Throws:
com.perforce.p4java.exception.ConnectionException
com.perforce.p4java.exception.AccessException
com.perforce.p4java.exception.RequestException
-
checkVersion
public boolean checkVersion(int min)
Checks the Perforce server version number and returns true if greater than or equal to the min version. The value of min must be of the form 20092 or 20073 (corresponding to 2009.2 and 2007.3 respectively).- Parameters:
min
- Minimum server version- Returns:
- true if version supported.
-
disconnect
protected void disconnect()
Disconnect from the Perforce Server.
-
hasAborted
public boolean hasAborted()
-
abort
public void abort()
-
getP4SCM
public PerforceScm.DescriptorImpl getP4SCM()
-
-