Introduced HttpCookieStore.Empty to disable cookies in HttpClient and in the websocket client.
This commit is contained in:
parent
a386a46045
commit
127f4978a9
|
@ -25,7 +25,6 @@ import java.util.Map;
|
|||
import java.util.Queue;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javax.servlet.AsyncContext;
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletException;
|
||||
|
@ -87,7 +86,7 @@ public class AsyncRestServlet extends AbstractRestServlet
|
|||
if (results==null)
|
||||
{
|
||||
// define results data structures
|
||||
final Queue<Map<String, String>> resultsQueue = new ConcurrentLinkedQueue<Map<String,String>>();
|
||||
final Queue<Map<String, String>> resultsQueue = new ConcurrentLinkedQueue<>();
|
||||
request.setAttribute(RESULTS_ATTR, results=resultsQueue);
|
||||
|
||||
// suspend the request
|
||||
|
@ -122,7 +121,7 @@ public class AsyncRestServlet extends AbstractRestServlet
|
|||
|
||||
// save timing info and return
|
||||
request.setAttribute(START_ATTR, start);
|
||||
request.setAttribute(DURATION_ATTR, new Long(System.nanoTime() - start));
|
||||
request.setAttribute(DURATION_ATTR, System.nanoTime() - start);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -163,7 +162,7 @@ public class AsyncRestServlet extends AbstractRestServlet
|
|||
out.close();
|
||||
}
|
||||
|
||||
private abstract class AsyncRestRequest implements Response.Listener
|
||||
private abstract class AsyncRestRequest extends Response.Listener.Empty
|
||||
{
|
||||
final Utf8StringBuilder _content = new Utf8StringBuilder();
|
||||
|
||||
|
@ -171,16 +170,6 @@ public class AsyncRestServlet extends AbstractRestServlet
|
|||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBegin(Response response)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeaders(Response response)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContent(Response response, ByteBuffer content)
|
||||
{
|
||||
|
@ -188,16 +177,6 @@ public class AsyncRestServlet extends AbstractRestServlet
|
|||
_content.append(bytes,0,bytes.length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Response response)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Response response, Throwable failure)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete(Result result)
|
||||
{
|
||||
|
@ -216,13 +195,11 @@ public class AsyncRestServlet extends AbstractRestServlet
|
|||
abstract void onAuctionFound(Map<String,String> details);
|
||||
abstract void onComplete();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||
{
|
||||
doGet(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue