SessionMessageEvent event = (SessionMessageEvent) eventQueue.poll(1000L, TimeUnit.MILLISECONDS);
SessionMessageEvent event = getMessage();
    public void block() {        while (true) {            if (isStopped) {                if (stopTime == 0) {                    stopTime = SystemTime.currentTimeMillis();                }                if (!sessionConnector.isLoggedOn()                        || SystemTime.currentTimeMillis() - stopTime > 5000L) {                    sessionConnector.stopSessionTimer();                    return;                }            }            try {                SessionMessageEvent event = (SessionMessageEvent) eventQueue.poll(1000L,                        TimeUnit.MILLISECONDS);                if (event != null) {                    event.processMessage();                }            } catch (InterruptedException e) {                // ignore            }        }    }