@Test public void testGetResponse() throws Exception { Object response = new Object(); Packet request = new Packet(); long callId = 1; Call call = new Call(callId, request); call.setResponse(response); Object realResponse = call.getResponse(); assertEquals(response, realResponse); assertEquals(callId, request.getCallId()); }
public Object getResponse() { try { Object res = (response != null) ? response : responseQueue.take(); return handleResponse(res); } catch (InterruptedException e) { throw new RuntimeException(e); } }
Call { public Object getResponse() { try { Object res = (response != null) ? response : responseQueue.take(); return handleResponse(res); } catch (InterruptedException e) { throw new RuntimeException(e); } } }
Call { public Object getResponse() { try { Object res = (response != null) ? response : responseQueue.take(); return handleResponse(res); } catch (InterruptedException e) { throw new RuntimeException(e); } } Call(Long id, Packet request); }
Call { public Object getResponse() { try { Object res = (response != null) ? response : responseQueue.take(); return handleResponse(res); } catch (InterruptedException e) { throw new RuntimeException(e); } } Call(Long id, Packet request); Packet getRequest(); Long getId(); Object getResponse(); Object getResponse(long timeout, TimeUnit unit); void onDisconnect(Member member); boolean hasResponse(); void setResponse(Object response); boolean isFireNforget(); void setFireNforget(boolean fireNforget); @Override String toString(); }
Call { public Object getResponse() { try { Object res = (response != null) ? response : responseQueue.take(); return handleResponse(res); } catch (InterruptedException e) { throw new RuntimeException(e); } } Call(Long id, Packet request); Packet getRequest(); Long getId(); Object getResponse(); Object getResponse(long timeout, TimeUnit unit); void onDisconnect(Member member); boolean hasResponse(); void setResponse(Object response); boolean isFireNforget(); void setFireNforget(boolean fireNforget); @Override String toString();  }