@Override public void processMessages(ByteArrayOutputStream output) { try { if (interfacePort != null) { try { List<BidibCommand> bidibMessages = requestFactory.create(output.toByteArray()); for (BidibCommand message : bidibMessages) { MSG_TX_LOGGER.info(">> {} : {}", message, ByteUtils.bytesToHex(message.getContent())); } } catch (Exception e1) { LOGGER.warn("Prepare logging outgoing messages to interface failed.", e1); } interfacePort.send(output.toByteArray()); } } catch (Exception ex) { LOGGER.warn("Send message from proxy to interface failed.", ex); } finally { output.reset(); } } };