Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip.security
Class CredentialsCacheEntry

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.sip.security.CredentialsCacheEntry

 class CredentialsCacheEntry
extends Object

Used to cache credentials through a call.

Author:
Emil Ivov

Field Summary
 UserCredentials userCredentials
          The user credentials associated with this cache entry.
 
Constructor Summary
CredentialsCacheEntry()
           
 
Method Summary
(package private)  boolean containsBranchID(String branchID)
          Determines whether these credentials have been used for the specified transaction.
(package private)  boolean popBranchID(String responseBranchID)
          Determines whether these credentials have been used for the specified transaction.
(package private)  void pushBranchID(String requestBranchID)
          Adds the specified branch id to the transaction history list so that we know that we've seen it and don't try to authenticate with the same credentials if we get an unauthorized response for it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userCredentials

public UserCredentials userCredentials
The user credentials associated with this cache entry.

Constructor Detail

CredentialsCacheEntry

CredentialsCacheEntry()
Method Detail

pushBranchID

void pushBranchID(String requestBranchID)
Adds the specified branch id to the transaction history list so that we know that we've seen it and don't try to authenticate with the same credentials if we get an unauthorized response for it.

Parameters:
requestBranchID - the id to add to the list of unconfirmed transactions.

popBranchID

boolean popBranchID(String responseBranchID)
Determines whether these credentials have been used for the specified transaction. If yes - the transaction is removed and true is returned. Otherwise we return false. We remove the transaction simply because there is no point in keeping it. We can't get an unauthorized response more than once in the same transaction.

Parameters:
responseBranchID - the branch id of the response to process.
Returns:
true if this entry has been used for the transaction.

containsBranchID

boolean containsBranchID(String branchID)
Determines whether these credentials have been used for the specified transaction.

Parameters:
branchID - the branch id of the transaction that we are looking for.
Returns:
true if this entry has been used for the transaction and false otherwise.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.