@Override public String toString() { String msgName; msgName = _requestMessage != null ? _requestMessage.getClass().getName() : "'" + _requestString + "'"; return this.getClass().getSimpleName() + "[" + _cp.getCellName() + ", " + msgName + "]"; }
@Override public void run() { // HsmControlGetBfDetailsMsg _log.info("Starting working thread"); try { while (true) { CellMessage msg = (CellMessage) _fifo.pop(); if (msg == null) { _log.warn("fifo empty"); break; } Message request = (Message) msg.getMessageObject(); try { if (request instanceof HsmControlGetBfDetailsMsg) { getBfDetails(((HsmControlGetBfDetailsMsg) request).getStorageInfo()); } else { throw new IllegalArgumentException("Not supported " + request.getClass().getName()); } request.setSucceeded(); msg.revertDirection(); try { sendMessage(msg); } catch (Exception ee) { _log.warn("Problem replying : " + ee); } } catch (Exception eee) { _failed++; _log.warn(eee.toString(), eee); request.setFailed(34, eee.toString()); msg.revertDirection(); try { sendMessage(msg); } catch (Exception ee) { _log.warn("Problem replying : " + ee); } } } } catch (Exception ee) { _log.warn("Got exception from run while : " + ee); } finally { _log.info("Working thread finished"); } }