@Override public void run() { try { //while (! _client.isClosed() && wsEndpointReader.onRead()) { while (_client.readFrame()) { ServiceRef.flushOutbox(); if (_is.fillBuffer() <= 0) { break; } } } catch (Exception e) { log.log(Level.WARNING, e.toString(), e); } finally { _client.close(); } } }
ServiceRef.flushOutbox(); state = dispatchRequest(); break; ServiceRef.flushOutbox(); state = processPoll(); break; ServiceRef.flushOutbox(); tailState = state; return tailState; System.out.println("UNKNOWN-STATE: " + state + " " + this); _state = tailState = StateConnection.DESTROY; ServiceRef.flushOutbox(); destroy(); throw new IllegalStateException(String.valueOf(state));
ServiceRef.flushOutbox();
ServiceRef.flushOutbox();
ServiceRef.flushOutbox();
ServiceRef.flushOutbox();
_service.open(this); ServiceRef.flushOutbox();
ServiceRef.flushOutbox();
@Test public void test() throws InterruptedException { _events.consumer(Consumer.class, c -> {State.addText(c.toString());}, Result.ignore()); ResultFuture<Consumer> result = new ResultFuture<>(); _events.publisher(Consumer.class, result); Consumer<String> publisher = result.get(1, TimeUnit.SECONDS); publisher.accept("Hello World!"); ServiceRef.flushOutbox(); Thread.sleep(10); Assert.assertEquals("Hello World!", State.state()); }
private boolean accept() { if (! _port.isActive()) { return false; } ConnectionTcp conn = port().newConnection(); boolean isAccept = false; try { ServiceRef.flushOutbox(); isAccept = accept(conn.socket()); if (isAccept) { conn.proxy().requestAccept(); } } finally { if (! isAccept) { port().freeConnection(conn); } } return isAccept; }
ServiceRef.flushOutbox();
@Test public void test(@Service("event:") Events events) throws InterruptedException { events.consumer(Consumer.class, c -> {State.addText(c.toString());}, Result.ignore()); ResultFuture<Consumer> result = new ResultFuture<>(); events.publisher(Consumer.class, result); Consumer<String> publisher = result.get(1, TimeUnit.SECONDS); publisher.accept("Hello World!"); ServiceRef.flushOutbox(); Thread.sleep(10); Assert.assertEquals("Hello World!", State.state()); } }
channelRpc.finish(); ServiceRef.flushOutbox();
public void connect(RequestBaratineImpl req) { FrameIn fIs; fIs = new FrameIn(); // _fIs = fIs; fIs.init(null, req.requestHttp().connTcp().readStream()); frameInput(fIs); // Endpoint endpoint = _endpointSkeleton.newEndpoint(_factory, paths); // Endpoint endpoint = wsCxt.getFactory().get(); //WebSocketBaratine wsConn = null;; ConnectionWebSocketBaratine connWs = new ConnectionWebSocketBaratine(this, req.requestHttp()); // order for duplex req.upgrade(connWs); req.flush(); _outProxy = req.connHttp().outProxy(); _outWriter = new OutWebSocketWriter(); try { _service.open(this); } catch (Exception e) { throw new RuntimeException(e); } ServiceRef.flushOutbox(); }
cursor.getLong(3)); ServiceRef.flushOutbox();