if(messageCode == MessageCode.Name.EMPTY){
log.info("Received empty ACK (remote endpoint: {}, message ID: {}).", remoteEndpoint,
messageID);
((OutboundReliableMessageTransfer) messageExchange).setConfirmed();
Token token = messageExchange.getToken();
Channels.fireMessageReceived(ctx, new EmptyAckReceivedEvent(remoteEndpoint, messageID, token));
me.getFuture().setSuccess();
}
else{
log.info("Received non-empty ACK (remote endpoint: {}, message ID: {}).",
remoteEndpoint, messageID);
((OutboundReliableMessageTransfer) messageExchange).setConfirmed();
ctx.sendUpstream(me);
}
}
else{
log.warn("No open CON found for ACK (remote endpoint: {}, message ID: {})", remoteEndpoint, messageID);
}
}
else if(messageType == MessageType.Name.RST){
OutboundMessageTransfer messageExchange = removeTransfer(remoteEndpoint, messageID);
if(messageExchange != null){
if(messageExchange instanceof OutboundReliableMessageTransfer){
((OutboundReliableMessageTransfer) messageExchange).setConfirmed();
}
Token token = messageExchange.getToken();
Channels.fireMessageReceived(ctx, new ResetReceivedEvent(remoteEndpoint, messageID, token));
}
else{
log.warn("No open CON found for RST (remote endpoint: {}, message ID: {})", remoteEndpoint, messageID);