public class Friends extends Object
Modifier and Type | Method and Description |
---|---|
static Friend |
createFriend(URI rootServices,
String consumerToken,
String consumerSecret)
Creates a friend.
|
static FriendProvider |
createFriendProvider(Collection<Friend> friends)
Returns a provider for the specified friends.
|
static FriendProvider |
createFriendProvider(Friend... friends)
Returns a provider for the specified friends.
|
static RootServices |
getRootServices(URI uri)
Parses the root services resources at the specified location.
|
static <T extends RootServices> |
getRootServices(URI uri,
Class<T> type)
Parses the root services resources at the specified location.
|
public static Friend createFriend(URI rootServices, String consumerToken, String consumerSecret)
rootServices
- the friend's rootservicesconsumerToken
- 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.public static FriendProvider createFriendProvider(Friend... friends)
friends
- some friends.public static FriendProvider createFriendProvider(Collection<Friend> friends)
friends
- some friends.public static RootServices getRootServices(URI uri)
uri
- the root services location.null
if the connection wasn't successful or the location does not correspond to a root
services.public static <T extends RootServices> T getRootServices(URI uri, Class<T> type)
T
- the type of RootServices to instantiate when parsing a root services stream.uri
- the root services location.type
- the RootServices subclass to use when binding the stream to a resource.null
if the connection wasn't successful or the location does not correspond to a root
services.getRootServices(URI)