Java Code to receive request of an Http request object and return back the response