SessionMessageEvent event = (SessionMessageEvent) eventQueue.poll(1000L, TimeUnit.MILLISECONDS);
SessionMessageEvent event = getMessage();
    public boolean poll() {        if (isStopped) {            if (stopTime == 0) {                stopTime = SystemTime.currentTimeMillis();            }            if (!sessionConnector.isLoggedOn() || SystemTime.currentTimeMillis() - stopTime > 5000L) {                sessionConnector.stopSessionTimer();                return false;            }        }        try {            SessionMessageEvent event = (SessionMessageEvent) eventQueue.poll(1000L,                    TimeUnit.MILLISECONDS);            if (event != null) {                event.processMessage();            }        } catch (InterruptedException e) {            log.error("Unexpected exception: " + e);        }        return true;    }