com.worklight.adapters.rest.api

Interface AdaptersAPI


  • Deprecated. 
    This interface is deprecated since V8.0, use AdaptersAPI instead.

    @Deprecated
    public interface AdaptersAPI
    API to send REST requests to other adapters (both Java and Javascript adapters)
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      org.apache.http.client.methods.HttpUriRequest createJavascriptAdapterRequest(java.lang.String adapter, java.lang.String procedure, java.lang.Object[] args)
      Deprecated. 
      Helper method to create request to a JS adapter (via REST)
      org.apache.http.HttpResponse executeAdapterRequest(org.apache.http.client.methods.HttpUriRequest request)
      Deprecated. 
      Sends HTTP request to another REST or Javascript adapter.
      JSONObject getResponseAsJSON(org.apache.http.HttpResponse response)
      Deprecated. 
      Reads the response to JSON.
    • Method Detail

      • executeAdapterRequest

        org.apache.http.HttpResponse executeAdapterRequest(org.apache.http.client.methods.HttpUriRequest request)
                                                           throws java.io.IOException,
                                                                  MFPServerOAuthException
        Deprecated. 
        Sends HTTP request to another REST or Javascript adapter.
        Parameters:
        request - - Apache HttpUriRequest to be sent to the adapter. The URI of this request must not be absolute. It must be relative to the "/adapters" endpoint. For example: "/myadapter/getStories"
        Returns:
        The response (standard HttpResponse)
        Throws:
        java.io.IOException
        MFPServerOAuthException
      • getResponseAsJSON

        JSONObject getResponseAsJSON(org.apache.http.HttpResponse response)
                                     throws java.io.IOException
        Deprecated. 
        Reads the response to JSON. It assumes that the response contains a JSON content.
        Parameters:
        response - - The response to be read
        Returns:
        A JSON object with the response content
        Throws:
        java.io.IOException
      • createJavascriptAdapterRequest

        org.apache.http.client.methods.HttpUriRequest createJavascriptAdapterRequest(java.lang.String adapter,
                                                                                   java.lang.String procedure,
                                                                                   java.lang.Object[] args)
        Deprecated. 
        Helper method to create request to a JS adapter (via REST)
        Parameters:
        adapter - - The adapter name
        procedure - - The procedure name
        args - - Arguments to be passed (Optional)
        Returns:


© Copyright IBM Corp. 2006, 2015. All Rights Reserved.