IncommingMessage convertMessage(org.eris.messaging.Message msg) throws org.eris.messaging.SessionException { if (!(msg instanceof IncommingMessage)) { throw new org.eris.messaging.SessionException("The supplied message is not a valid type"); } IncommingMessage m = (IncommingMessage) msg; if (m.getSessionID() != _id) { throw new org.eris.messaging.SessionException( "The supplied message is not associated with this session"); } return m; }
void setDispositionAndSettleIfRequired(IncommingMessage msg, DeliveryState state) { Delivery d = _unsettled.get(msg.getSequence()); d.disposition(state); if (d.getLink().getReceiverSettleMode() == ReceiverSettleMode.FIRST) { d.settle(); ((ReceiverImpl) d.getLink().getContext()).decrementUnsettledCount(); } }