* You have to design a async Networking Library in Java named myHttp (basically wrapper over HttpURLConnection), * the library should expose the following interface. */
/** * [login to view URL] API example of GET request. * String: methodType * String: url * Map<String, String>: headers * String: tag */
ListenableFuture<myResponse> getResponseFuture =
[login to view URL](new OfbRequest(GET, url, headers, tag));
[login to view URL](getResponseFuture, new FutureCallback<OfbResponse>() { public void onSuccess(myResponse ofbResponse) { //process response asynchronously } public void onFailure(Throwable thrown) { //process failure } public void onCancel() { //process cancellation }});
/** * [login to view URL] API example of POST request. * String: methodType * String: body * String: url * Map<String, String>: headers * String: tag * */
ListenableFuture<myResponse> postResponseFuture =
[login to view URL](new myRequest(POST, body, url, headers, tag));
[login to view URL](postResponseFuture, new FutureCallback<myResponse>() { public void onSuccess(myResponse myResponse) { //process response asynchronously } public void onFailure(Throwable thrown) { //process failure } public void onCancel() { //process cancellation }});
/** * [login to view URL] API example of GET request * This will cancel all the requests with the provided "tag" and call their onCancel callback */[login to view URL](tag);
/** * Notes: * If multiple GET requests hit the same url. Then all of the callers should get same response. * * ListenableFuture is a class from guava library * [login to view URL] *
Hi,
I am interested to work on this project...
Let me know if you want me to work on this project....
THanks,
Harsh........................................
hi I m java developer. I m working with Ericsson. we are using RF core along with Akka for this same asynchronous implantation.
I would like to discuss in detail upon chat.