authorization
Class HostCredentials

java.lang.Object
  extended by authorization.HostCredentials
All Implemented Interfaces:
IHostCredentialMap

public class HostCredentials
extends java.lang.Object
implements IHostCredentialMap

Map client user name to host credentials for that client.

This class implements the IHostCredentialMap interface. It uses an in-memory map from client user names to host user credentials.


Field Summary
private  java.util.HashMap credentials
          Map from Verastream client user name to host credentials.
 
Constructor Summary
HostCredentials()
          Default constructor.
 
Method Summary
 void addHostCredential(java.lang.String vhiUser, IHostCredential credential)
          Add a new set of host credentials for a client (Verastream) user.
 IHostCredential getHostCredentialsFor(java.lang.String vhiUser)
          Return the host credentials for a client (Verastream) user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

credentials

private java.util.HashMap credentials
Map from Verastream client user name to host credentials.

Constructor Detail

HostCredentials

public HostCredentials()
Default constructor. Create an empty instance.

Method Detail

addHostCredential

public void addHostCredential(java.lang.String vhiUser,
                              IHostCredential credential)
                       throws java.lang.IllegalArgumentException
Add a new set of host credentials for a client (Verastream) user.

Parameters:
vhiUser - name of Verastream user
credential - host credential for this user
Throws:
java.lang.IllegalArgumentException

getHostCredentialsFor

public IHostCredential getHostCredentialsFor(java.lang.String vhiUser)
Return the host credentials for a client (Verastream) user.

Specified by:
getHostCredentialsFor in interface IHostCredentialMap
Parameters:
vhiUser - name used to login to Verastream server
Returns:
host credentials for this user, null if none available