public Object getSubstituteValue(EntryEventImpl clonedEvent, EnumListenerEvent operation) { // Get substitution value to enqueue if necessary Object substituteValue = null; if (this.substitutionFilter != null) { try { substituteValue = this.substitutionFilter.getSubstituteValue(clonedEvent); // If null is returned from the filter, null is set in the value if (substituteValue == null) { substituteValue = GatewaySenderEventImpl.TOKEN_NULL; } } catch (Exception e) { // Log any exceptions that occur in the filter and use the original value. logger.warn(String.format( "%s: An Exception occurred while queueing %s to perform operation %s for %s", new Object[] {this, getId(), operation, clonedEvent}), e); } } return substituteValue; }