public JmsKeyFormatStrategy getJmsKeyFormatStrategy() { if (jmsKeyFormatStrategy == null) { jmsKeyFormatStrategy = new DefaultJmsKeyFormatStrategy(); } return jmsKeyFormatStrategy; }
public JmsBinding() { this.endpoint = null; this.headerFilterStrategy = new JmsHeaderFilterStrategy(false); this.jmsKeyFormatStrategy = new DefaultJmsKeyFormatStrategy(); this.messageCreatedStrategy = null; }
/** * Resolves the standard supported {@link JmsKeyFormatStrategy} by a name which can be: * <ul> * <li>default - to use the default strategy</li> * <li>passthrough - to use the passthrough strategy</li> * </ul> * * @param name the name * @return the strategy, or <tt>null</tt> if not a standard name. */ private static JmsKeyFormatStrategy resolveStandardJmsKeyFormatStrategy(String name) { if ("default".equalsIgnoreCase(name)) { return new DefaultJmsKeyFormatStrategy(); } else if ("passthrough".equalsIgnoreCase(name)) { return new PassThroughJmsKeyFormatStrategy(); } else { return null; } }
public JmsBinding(JmsEndpoint endpoint) { this.endpoint = endpoint; if (endpoint.getHeaderFilterStrategy() != null) { this.headerFilterStrategy = endpoint.getHeaderFilterStrategy(); } else { this.headerFilterStrategy = new JmsHeaderFilterStrategy(endpoint.isIncludeAllJMSXProperties()); } if (endpoint.getJmsKeyFormatStrategy() != null) { this.jmsKeyFormatStrategy = endpoint.getJmsKeyFormatStrategy(); } else { this.jmsKeyFormatStrategy = new DefaultJmsKeyFormatStrategy(); } if (endpoint.getMessageCreatedStrategy() != null) { this.messageCreatedStrategy = endpoint.getMessageCreatedStrategy(); } else if (endpoint.getComponent() != null) { // fallback and use from component this.messageCreatedStrategy = endpoint.getComponent().getMessageCreatedStrategy(); } else { this.messageCreatedStrategy = null; } }