if (AtmosphereResourceImpl.class.isAssignableFrom(r.getClass())) {
if (AtmosphereResourceImpl.class.cast(r).isInScope()) {
if (r.getRequest() instanceof HttpServletRequest && bc.hasPerRequestFilters()) {
Object message = msg.originalMessage;
BroadcastAction a = bc.filter( (HttpServletRequest) r.getRequest(), (HttpServletResponse) r.getResponse(), message);
if (a.action() == BroadcastAction.ACTION.ABORT
|| a.message() != msg.originalMessage) {
finalMsg = a.message();
}
}
trackBroadcastMessage(r, finalMsg);
} else {
// The resource is no longer valid.