// so we deliver them to the registrar and they should decide
//if (emailData.isExpired())
// return DISCARD;
String key = emailData.getSessionId(msgIdFileName) + emailData.getRequestId(msgIdFileName);
I_ResponseListener listenerSession = null;
I_ResponseListener listenerRequest = null;
I_ResponseListener listenerClusterNodeId = null;
synchronized (this.listeners) {
listenerRequest = (I_ResponseListener) this.listeners.get(key);
if (listenerRequest == null) {
listenerSession = (I_ResponseListener) this.listeners
.get(emailData.getSessionId(msgIdFileName));
if (listenerSession == null) {
listenerClusterNodeId = (I_ResponseListener) this.listeners
.get(this.glob.getId());
}
}
}
// A request/reply handler is interested in specific messages only
if (listenerRequest != null) {
if (log.isLoggable(Level.FINER))
log.finer("Request specific listener found for key=" + key
+ ", email is " + emailData.toString());
listenerRequest.incomingMessage(emailData.getRequestId(msgIdFileName),
emailData);
return key;
}
// A session is interested in all messages
if (listenerSession != null) {
if (log.isLoggable(Level.FINER))
log.finer("SessRequest specific listener found for key="
+ emailData.getSessionId(msgIdFileName) + ", email is "
+ emailData.toString());
listenerSession.incomingMessage(emailData.getRequestId(msgIdFileName),
emailData);
return emailData.getSessionId(msgIdFileName);
}
// A cluster node is interested in all messages (EmailDriver.java)
if (listenerClusterNodeId != null) {
if (log.isLoggable(Level.FINER))
log.finer("Node specific listener found for key="
+ this.glob.getId() + ", email is " + emailData.toString());
listenerClusterNodeId.incomingMessage(emailData.getRequestId(msgIdFileName),
emailData);
return emailData.getSessionId(msgIdFileName);
}
if (calledFromHoldbackMap) {