Class Friends


  • public class Friends
    extends Object
    Provides facilities to instantiate a FriendProvider and to parse root services resources.
    • Method Detail

      • createFriend

        public static Friend createFriend​(URI rootServices,
                                          String consumerToken,
                                          String consumerSecret)
        Creates a friend.
        Parameters:
        rootServices - the friend's rootservices
        consumerToken - the consumer token declared on the friend to grant access to a client.
        consumerSecret - the consumer secret declared on the friend to grant access to a client.
        Returns:
        a friend wrapping the specified information.
      • createFriend

        public static Friend createFriend​(String title,
                                          URI rootServices,
                                          String consumerToken,
                                          String consumerSecret)
        Creates a friend.
        Parameters:
        title - the friend's title
        rootServices - the friend's rootservices
        consumerToken - the consumer token declared on the friend to grant access to a client.
        consumerSecret - the consumer secret declared on the friend to grant access to a client.
        Returns:
        a friend wrapping the specified information.
        Since:
        1.14.0
      • createFriendProvider

        public static FriendProvider createFriendProvider​(Friend... friends)
        Returns a provider for the specified friends.
        Parameters:
        friends - some friends.
        Returns:
        a provider for those friends.
      • createFriendProvider

        public static FriendProvider createFriendProvider​(Collection<Friend> friends)
        Returns a provider for the specified friends.
        Parameters:
        friends - some friends.
        Returns:
        a provider for those friends.
      • getRootServices

        @Deprecated
        public static RootServices getRootServices​(URI uri)
        Deprecated.
        Use GetRootServices to request root services or RootServicesCache to obtain a cache version of the resource.
        Parses the root services resources at the specified location.
        Parameters:
        uri - the root services location.
        Returns:
        a RootServices instance, or null if the connection wasn't successful or the location does not correspond to a root services.
        See Also:
        GetRootServices, RootServicesCache
      • getRootServices

        @Deprecated
        public static <T extends RootServices> T getRootServices​(URI uri,
                                                                 Class<T> type)
        Deprecated.
        Use GetRootServices to request root services.
        Parses the root services resources at the specified location. This method is convenient to use a subclass of RootServices, for example to provide additional getters.
        Type Parameters:
        T - the type of RootServices to instantiate when parsing a root services stream.
        Parameters:
        uri - the root services location.
        type - the RootServices subclass to use when binding the stream to a resource.
        Returns:
        a RootServices instance, or null if the connection wasn't successful or the location does not correspond to a root services.
        See Also:
        GetRootServices