src/main/java/net/cpas/Cpas.java
private <T> Future<?> makeApiCall(String apiInfo, ProcessResponse<T> callback) {
        Objects.requireNonNull(callback, "callback");
        final Runnable runnable;
        synchronized(mutex) {
            runnable = new GetFromNetwork<>(apiUrl, apiKey, serverIp, serverPort, apiInfo, callback);
        }
        return executorService.submit(runnable);
    }
/**
     * Opens up a connection to the CPAS API url on one of this.{@link #executorService}'s threads and retrieves the JSON
     * information as a {@code String} and then parses it to an {@link ObjectMapper}. The {@link ProcessResponse}
     * callback is invoked when the process completes and is provided the resulting parsed response or an error string
     *
     * @param apiInfo  The API call information specific to the particular call being made.
     * @param callback A {@link ProcessResponse} to be executed when the response comes back from the server. Note that
     *                 this gets executed on a thread other than the one it was called from. If you need to process the
     *                 response on a specific thread you will have to take care of passing the data given to you in the
     *                 callback into another {@link Runnable}, {@link Callable}, or similar type of object and have that
     *                 task executed on the appropriate thread.
     * @return the future object to be executed.
     */
Opens up a connection to the CPAS API url on one of this. #executorService's threads and retrieves the JSON
information as a  String and then parses it to an  ObjectMapper. The  ProcessResponse
callback is invoked when the process completes and is provided the resulting parsed response or an error string

@param apiInfo  The API call information specific to the particular call being made.
@param callback A  ProcessResponse to be executed when the response comes back from the server. Note that
this gets executed on a thread other than the one it was called from. If you need to process the
response on a specific thread you will have to take care of passing the data given to you in the
callback into another  Runnable,  Callable, or similar type of object and have that
task executed on the appropriate thread.
@return the future object to be executed.
Opens up a connection to the CPAS API url on one of this . #executorService ' s threads and retrieves the JSON information as a String and then parses it to an ObjectMapper . The ProcessResponse callback is invoked when the process completes and is provided the resulting parsed response or an error string @param apiInfo The API call information specific to the particular call being made . @param callback A ProcessResponse to be executed when the response comes back from the server . Note that this gets executed on a thread other than the one it was called from . If you need to process the response on a specific thread you will have to take care of passing the data given to you in the callback into another Runnable Callable or similar type of object and have that task executed on the appropriate thread . @return the future object to be executed .
private <T> Future<?> makeApiCall(String apiInfo, ProcessResponse<T> callback) {
        Objects.requireNonNull(callback, "callback");
        final Runnable runnable;
        synchronized(mutex) {
            runnable = new GetFromNetwork<>(apiUrl, apiKey, serverIp, serverPort, apiInfo, callback);
        }
        return executorService.submit(runnable);
    }
private < T > Future < ? > makeApiCall ( String apiInfo , ProcessResponse < T > callback ) { Objects . requireNonNull ( callback , "callback" ) ; final Runnable runnable ; synchronized ( mutex ) { runnable = new GetFromNetwork < > ( apiUrl , apiKey , serverIp , serverPort , apiInfo , callback ) ; } return executorService . submit ( runnable ) ; }
Opens up a connection to the CPAS API url on one of this.
Opens up a connection to the CPAS API url on one of this .