public class

Client

extends AbstractClient
java.lang.Object
   ↳ com.kinvey.java.core.AbstractKinveyClient
     ↳ com.kinvey.java.core.AbstractKinveyJsonClient
       ↳ com.kinvey.java.AbstractClient
         ↳ com.kinvey.nativejava.Client

Class Overview

Summary

Nested Classes
class Client.Builder Create a client for interacting with Kinvey's services from an Android Activity. 
[Expand]
Inherited Constants
From class com.kinvey.java.AbstractClient
Public Methods
<T> AppData<T> appData(String collectionName, Class<T> myClass)
AppData factory method

Returns an instance of com.kinvey.java.AppData for the supplied collection.

<I, O> CustomEndpoints<I, O> customEndpoints(Class<O> myClass)
Custom Endpoints factory method

Returns the instance of CustomEndpoints used for executing RPC requests.

File file()
File factory method

Returns an instance of File for uploading and downloading of files.

void performLockDown()
boolean ping()
Asynchronous Ping service method

Performs an authenticated ping against the configured Kinvey backend.

User user()
User factory method

Returns the instance of User that contains the current active user.

UserDiscovery userDiscovery()
UserDiscovery factory method

Returns the instance of UserDiscovery used for searching for users.

UserGroup userGroup()
UserGroup factory method

Returns the instance of UserGroup used for managing user groups.

[Expand]
Inherited Methods
From class com.kinvey.java.AbstractClient
From class com.kinvey.java.core.AbstractKinveyJsonClient
From class com.kinvey.java.core.AbstractKinveyClient
From class java.lang.Object

Public Methods

public AppData<T> appData (String collectionName, Class<T> myClass)

AppData factory method

Returns an instance of com.kinvey.java.AppData for the supplied collection. A new instance is created for each collection, but only one instance of AppData is created per collection. The method is Generic and takes an instance of a com.google.api.client.json.GenericJson entity type that is used for fetching/saving of com.kinvey.java.AppData.

This method is thread-safe.

Sample Usage:

 AppData<myEntity> myAppData = kinveyClient.appData("entityCollection", myEntity.class);
    
 

Parameters
collectionName The name of the collection
myClass The class that defines the entity of type com.google.api.client.json.GenericJson used for saving and fetching of data
Returns
  • Instance of com.kinvey.java.AppData for the defined collection

public CustomEndpoints<I, O> customEndpoints (Class<O> myClass)

Custom Endpoints factory method

Returns the instance of CustomEndpoints used for executing RPC requests. Only one instance of Custom Endpoints is created for each instance of the Kinvey Client.

This method is thread-safe.

Sample Usage:

     AsyncCustomEndpoints<MyRequestClass, MyResponseClass> endpoints = getClient().customEndpoints(MyResponseClass.class);
     
 

Returns

public File file ()

File factory method

Returns an instance of File for uploading and downloading of files. Only one instance is created for each instance of the Kinvey client.

This method is thread-safe.

Sample Usage:

 File myFile = kinveyClient.file();
    
 

Returns
  • Instance of File for the defined collection

public void performLockDown ()

public boolean ping ()

Asynchronous Ping service method

Performs an authenticated ping against the configured Kinvey backend.

Sample Usage:

     boolean ping = kinveyClient.ping().execute();
     
 

Returns
  • true if ping is successful, false if it fails

public User user ()

User factory method

Returns the instance of User that contains the current active user. If no active user context has been established, the User object returned will be instantiated and empty.

This method is thread-safe.

Sample Usage:

 User currentUser = kinveyClient.currentUser();
    
 

Returns
  • Instance of User for the defined collection

public UserDiscovery userDiscovery ()

UserDiscovery factory method

Returns the instance of UserDiscovery used for searching for users. Only one instance of UserDiscovery is created for each instance of the Kinvey Client.

This method is thread-safe.

Sample Usage:

     UserDiscovery myUserDiscovery = kinveyClient.userDiscovery();
     
 

Returns

public UserGroup userGroup ()

UserGroup factory method

Returns the instance of UserGroup used for managing user groups. Only one instance of UserGroup is created for each instance of the Kinvey Client.

This method is thread-safe.

Sample Usage:

     UserGroup myUserGroup = kinveyClient.userGroup();
     
 

Returns
  • Instance of UserGroup for the defined collection