Class AuthCollection

java.lang.Object
com.vonage.client.auth.AuthCollection

public class AuthCollection
extends java.lang.Object
Internal class, managing a collection of AuthMethods.

This holds a collection of AuthMethod instances, in order of preference, and allow for simple selection of an appropriate AuthMethod for a particular REST endpoint.

  • Constructor Summary

    Constructors 
    Constructor Description
    AuthCollection()
    Create a new AuthCollection with an empty set of AuthMethods.
    AuthCollection​(AuthMethod... authMethods)  
    AuthCollection​(java.util.SortedSet<AuthMethod> authMethods)  
  • Method Summary

    Modifier and Type Method Description
    void add​(AuthMethod auth)
    Add a new AuthMethod to the set managed by this AuthCollection
    AuthMethod getAcceptableAuthMethod​(java.util.Set<java.lang.Class> acceptableAuthMethodClasses)
    Obtain an AuthMethod instance for a set of acceptable AuthMethod classes.
    <T extends AuthMethod>
    T
    getAuth​(java.lang.Class<T> type)
    Obtain an AuthMethod of type T, if one is contained in this collection.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait