@Test public void enqueueResponse() { final Connection connection = createConnection(); assertEquals( connection.getPendingAreaOfInterestRequests().size(), 0 ); final ServerToClientMessage data1 = OkMessage.create( 1 ); final ServerToClientMessage data2 = OkMessage.create( 1 ); assertEquals( connection.getPendingResponses().size(), 0 ); connection.enqueueResponse( data1, null ); assertEquals( connection.getPendingResponses().size(), 1 ); connection.enqueueResponse( data2, null ); assertEquals( connection.getPendingResponses().size(), 2 ); final MessageResponse response1 = connection.getPendingResponses().get( 0 ); final MessageResponse response2 = connection.getPendingResponses().get( 1 ); assertEquals( response1.getMessage(), data1 ); assertEquals( response2.getMessage(), data2 ); }
void enqueueResponse( @Nonnull final ServerToClientMessage message, @Nullable final RequestEntry request ) { _pendingResponses.add( new MessageResponse( _connector.getSchema().getId(), message, request ) ); }
Connection { void enqueueResponse( @Nonnull final ServerToClientMessage message, @Nullable final RequestEntry request ) { _pendingResponses.add( new MessageResponse( _connector.getSchema().getId(), message, request ) ); } }
Connection { void enqueueResponse( @Nonnull final ServerToClientMessage message, @Nullable final RequestEntry request ) { _pendingResponses.add( new MessageResponse( _connector.getSchema().getId(), message, request ) ); } Connection( @Nonnull final Connector connector ); }
Connection { void enqueueResponse( @Nonnull final ServerToClientMessage message, @Nullable final RequestEntry request ) { _pendingResponses.add( new MessageResponse( _connector.getSchema().getId(), message, request ) ); } Connection( @Nonnull final Connector connector );  }
Connection { void enqueueResponse( @Nonnull final ServerToClientMessage message, @Nullable final RequestEntry request ) { _pendingResponses.add( new MessageResponse( _connector.getSchema().getId(), message, request ) ); } Connection( @Nonnull final Connector connector );   }