@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // lets return the next response Command packet = null; int count = 0; try { BlockingQueueTransport transportChannel = getTransportChannel(request, response); if (transportChannel == null) { return; } packet = (Command)transportChannel.getQueue().poll(requestTimeout, TimeUnit.MILLISECONDS); DataOutputStream stream = new DataOutputStream(response.getOutputStream()); wireFormat.marshal(packet, stream); count++; } catch (InterruptedException ignore) { } if (count == 0) { response.setStatus(HttpServletResponse.SC_REQUEST_TIMEOUT); } }
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // lets return the next response Command packet = null; int count = 0; try { BlockingQueueTransport transportChannel = getTransportChannel(request, response); if (transportChannel == null) { return; } packet = (Command)transportChannel.getQueue().poll(requestTimeout, TimeUnit.MILLISECONDS); DataOutputStream stream = new DataOutputStream(response.getOutputStream()); wireFormat.marshal(packet, stream); count++; } catch (InterruptedException ignore) { } if (count == 0) { response.setStatus(HttpServletResponse.SC_REQUEST_TIMEOUT); } }
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // lets return the next response Command packet = null; int count = 0; try { BlockingQueueTransport transportChannel = getTransportChannel(request, response); if (transportChannel == null) { return; } packet = (Command)transportChannel.getQueue().poll(requestTimeout, TimeUnit.MILLISECONDS); DataOutputStream stream = new DataOutputStream(response.getOutputStream()); wireFormat.marshal(packet, stream); count++; } catch (InterruptedException ignore) { } if (count == 0) { response.setStatus(HttpServletResponse.SC_REQUEST_TIMEOUT); } }
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // lets return the next response Command packet = null; int count = 0; try { BlockingQueueTransport transportChannel = getTransportChannel(request, response); if (transportChannel == null) { return; } packet = (Command)transportChannel.getQueue().poll(requestTimeout, TimeUnit.MILLISECONDS); DataOutputStream stream = new DataOutputStream(response.getOutputStream()); wireFormat.marshal(packet, stream); count++; } catch (InterruptedException ignore) { } if (count == 0) { response.setStatus(HttpServletResponse.SC_REQUEST_TIMEOUT); } }