@Test public void testOfferEventAndRun() throws Exception { client.offer(TEST_EVENT); Thread thread = new Thread(client); thread.start(); thread.join(1000); assertFalse(thread.isAlive()); ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(outputStream.toByteArray())); assertEquals(TEST_EVENT, ois.readObject()); }
public boolean offer(Serializable event) { if (queue == null) { throw new IllegalStateException("client has no event queue"); } return queue.offer(event); }
RemoteReceiverStreamClient extends ContextAwareBase implements RemoteReceiverClient { public boolean offer(Serializable event) { if (queue == null) { throw new IllegalStateException("client has no event queue"); } return queue.offer(event); } }
RemoteReceiverStreamClient extends ContextAwareBase implements RemoteReceiverClient { public boolean offer(Serializable event) { if (queue == null) { throw new IllegalStateException("client has no event queue"); } return queue.offer(event); } RemoteReceiverStreamClient(String id, Socket socket);   RemoteReceiverStreamClient(String id, OutputStream outputStream); }
RemoteReceiverStreamClient extends ContextAwareBase implements RemoteReceiverClient { public boolean offer(Serializable event) { if (queue == null) { throw new IllegalStateException("client has no event queue"); } return queue.offer(event); } RemoteReceiverStreamClient(String id, Socket socket);   RemoteReceiverStreamClient(String id, OutputStream outputStream); void setQueue(BlockingQueue<Serializable> queue); boolean offer(Serializable event); void close(); void run(); }
RemoteReceiverStreamClient extends ContextAwareBase implements RemoteReceiverClient { public boolean offer(Serializable event) { if (queue == null) { throw new IllegalStateException("client has no event queue"); } return queue.offer(event); } RemoteReceiverStreamClient(String id, Socket socket);   RemoteReceiverStreamClient(String id, OutputStream outputStream); void setQueue(BlockingQueue<Serializable> queue); boolean offer(Serializable event); void close(); void run();  }