API Reference

com.kinvey.android

Class AsyncCustomEndpoints<I extends GenericJson,O>

  • com.kinvey.android.AsyncCustomEndpoints<I,O>


  • public class AsyncCustomEndpoints<I extends GenericJson,O>

    Wraps the com.kinvey.java.CustomEndpoints public methods in asynchronous functionality using native Android AsyncTask.

    NOTE: It is the responsibility of the user to either use a interface KinveyListCallback or a com.kinvey.java.core.KinveyClientCallback depending on what their Custom Endpoint returns.

    Sample usage:

    The above sample assumes the Custom Endpoint takes no input null and returns an array of JSON objects.

    See Also:
    interface KinveyListCallback
    • Constructor Detail

      • AsyncCustomEndpoints

        public AsyncCustomEndpoints(com.kinvey.java.AbstractClient<?> client)
        Deprecated. 

        Constructor for this Asyncronous Custom Endpoint class

        Parameters:
        client -
      • AsyncCustomEndpoints

        public AsyncCustomEndpoints(java.lang.Class<O> responseClass,
                                    com.kinvey.java.AbstractClient<?> client)

        Constructor for this Asyncronous Custom Endpoint class

        Parameters:
        responseClass - the class of the expected resposne object
        client - an active logged in client
    • Method Detail

      • callEndpoint

        public void callEndpoint(java.lang.String commandName,
                                 I input,
                                 com.kinvey.java.core.KinveyClientCallback<O> callback)

        Execute a Custom Endpoint which will return a single JSON object

        Parameters:
        commandName -
        • the name of the Command to execute

        input -
        • any required input, can be null

        callback -
        • get results of the command as a single JSON object

      • callEndpoint

        public void callEndpoint(java.lang.String commandName,
                                 I input,
                                 KinveyListCallback<O> callback)

        Execute a Custom Endpoint which will return an array of JSON objects.

        Parameters:
        commandName -
        • the name of the Command to execute

        input -
        • any required input, can be null

        callback -
        • get results of the command as an array of JSON objects.