protected void processStompFrame(String data) { if (!transportStartedAtLeastOnce()) { LOG.debug("Waiting for StompSocket to be properly started..."); try { socketTransportStarted.await(); } catch (InterruptedException e) { LOG.warn("While waiting for StompSocket to be properly started, we got interrupted!! Should be okay, but you could see race conditions..."); } } protocolLock.lock(); try { if (data != null) { receiveCounter += data.length(); if (data.equals("\n")) { stompInactivityMonitor.onCommand(new KeepAliveInfo()); } else { StompFrame frame = (StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes("UTF-8"))); frame.setTransportContext(getPeerCertificates()); protocolConverter.onStompCommand(frame); } } } catch (Exception e) { onException(IOExceptionSupport.create(e)); } finally { protocolLock.unlock(); } }
protected void processStompFrame(String data) { if (!transportStartedAtLeastOnce()) { LOG.debug("Waiting for StompSocket to be properly started..."); try { socketTransportStarted.await(); } catch (InterruptedException e) { LOG.warn("While waiting for StompSocket to be properly started, we got interrupted!! Should be okay, but you could see race conditions..."); } } protocolLock.lock(); try { if (data != null) { receiveCounter += data.length(); if (data.equals("\n")) { stompInactivityMonitor.onCommand(new KeepAliveInfo()); } else { StompFrame frame = (StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes("UTF-8"))); frame.setTransportContext(getPeerCertificates()); protocolConverter.onStompCommand(frame); } } } catch (Exception e) { onException(IOExceptionSupport.create(e)); } finally { protocolLock.unlock(); } }
protected void processStompFrame(String data) { if (!transportStartedAtLeastOnce()) { LOG.debug("Waiting for StompSocket to be properly started..."); try { socketTransportStarted.await(); } catch (InterruptedException e) { LOG.warn("While waiting for StompSocket to be properly started, we got interrupted!! Should be okay, but you could see race conditions..."); } } protocolLock.lock(); try { if (data != null) { receiveCounter += data.length(); if (data.equals("\n")) { stompInactivityMonitor.onCommand(new KeepAliveInfo()); } else { StompFrame frame = (StompFrame)wireFormat.unmarshal(new ByteSequence(data.getBytes("UTF-8"))); frame.setTransportContext(getPeerCertificates()); protocolConverter.onStompCommand(frame); } } } catch (Exception e) { onException(IOExceptionSupport.create(e)); } finally { protocolLock.unlock(); } }