logger.severe("handleAsynchronousInfo() - received event with no listenerID: " + event.toOIF());
return;
}
ResponseCallback cb = eventHandlers.get(event.getListenerID());
if (cb == null){
logger.severe("handleAsynchronousInfo() - couldn't get callback for event with listenerID: " + event.getListenerID());
}
else{
// Set the handleID on the event so that the callback will know how to route the event
event.setHandlerID(cb.getRequest().getHandlerID());
if ( (originatorID != null) && (event.getOriginatorID() != null)){
if (originatorID == event.getOriginatorID())
event.setMyOwnEvent(true);
}
cb.getEventHandler().handleEvent(event);
}
}
else if (async instanceof ResponseDMO){
ResponseDMO response = (ResponseDMO) async;
if (controllerTracing)
logger.finest("handleAsynchronousInfo() - got response:\n\n" + response.toOIF() + "\n\n");
ResponseCallback cb = requests.get(response.getNthRequestID(0));
if (cb == null){
logger.severe("handleAsynchronousInfo() - couldn't get callback for response: " + response.toOIF());
}
else{
if (cb.getCallbackID() == GetResponseCallback.ID)
registerEventHandler(cb, (GetResponseDMO) response);
cb.getHandler().handleResponse(response);
if (response.isLastResponse()){
if (controllerTracing)
logger.finest("handleAsynchronousInfo() is last response...");
requests.remove(response.getNthRequestID(0));