private boolean isSystemEventSupported(final SystemEvent event) { final String targetApplicationName = event.getTargetApplicationName(); final String targetApplicationVersion = event.getTargetApplicationVersion(); return (targetApplicationName == null || targetApplicationName.equals(applicationName)) && (targetApplicationVersion == null || targetApplicationVersion.equals(applicationVersion)); }
@Override public void handle(final SystemEvent event) { if (isSystemEventSupported(event)) { handleSystemEvent(event); } else { if (logger.isDebugEnabled()) { final String applicationNameSignature = event.getTargetApplicationName() == null ? "*" : event.getTargetApplicationName(); final String applicationVersionSignature = event.getTargetApplicationVersion() == null ? "*" : event.getTargetApplicationVersion(); logger.debug( "Ignoring message for '" + applicationNameSignature + "-" + applicationVersionSignature + "': " + event.type()); } } }