@Test public void testApplyQueueConnectionFactory_NonFloat() throws Exception { SimpleFactoryConfiguration extras = create(new KeyValuePair(SOME_FLOAT_VALUE, "fred")); DummyConnectionFactory mycf = new DummyConnectionFactory(); extras.applyConfiguration(mycf); doBaseAssertions(mycf); }
@Override public void applyConfiguration(Object cf) throws JMSException { if (BooleanUtils .or(new boolean[] {cf instanceof ConnectionFactory, cf instanceof XAConnectionFactory})) { getProperties().stream().forEach((kvp) -> SimpleBeanUtil.callSetter(cf, "set" + kvp.getKey(), kvp.getValue())); } else { throw new JMSException("Object to apply configuration is not a XA/ConnectionFactory."); } }
SimpleFactoryConfiguration implements ExtraFactoryConfiguration { @Override public void applyConfiguration(Object cf) throws JMSException { if (BooleanUtils .or(new boolean[] {cf instanceof ConnectionFactory, cf instanceof XAConnectionFactory})) { getProperties().stream().forEach((kvp) -> SimpleBeanUtil.callSetter(cf, "set" + kvp.getKey(), kvp.getValue())); } else { throw new JMSException("Object to apply configuration is not a XA/ConnectionFactory."); } } }
SimpleFactoryConfiguration implements ExtraFactoryConfiguration { @Override public void applyConfiguration(Object cf) throws JMSException { if (BooleanUtils .or(new boolean[] {cf instanceof ConnectionFactory, cf instanceof XAConnectionFactory})) { getProperties().stream().forEach((kvp) -> SimpleBeanUtil.callSetter(cf, "set" + kvp.getKey(), kvp.getValue())); } else { throw new JMSException("Object to apply configuration is not a XA/ConnectionFactory."); } } SimpleFactoryConfiguration(); }
SimpleFactoryConfiguration implements ExtraFactoryConfiguration { @Override public void applyConfiguration(Object cf) throws JMSException { if (BooleanUtils .or(new boolean[] {cf instanceof ConnectionFactory, cf instanceof XAConnectionFactory})) { getProperties().stream().forEach((kvp) -> SimpleBeanUtil.callSetter(cf, "set" + kvp.getKey(), kvp.getValue())); } else { throw new JMSException("Object to apply configuration is not a XA/ConnectionFactory."); } } SimpleFactoryConfiguration(); @Override void applyConfiguration(Object cf); KeyValuePairSet getProperties(); void setProperties(KeyValuePairSet extras); }
SimpleFactoryConfiguration implements ExtraFactoryConfiguration { @Override public void applyConfiguration(Object cf) throws JMSException { if (BooleanUtils .or(new boolean[] {cf instanceof ConnectionFactory, cf instanceof XAConnectionFactory})) { getProperties().stream().forEach((kvp) -> SimpleBeanUtil.callSetter(cf, "set" + kvp.getKey(), kvp.getValue())); } else { throw new JMSException("Object to apply configuration is not a XA/ConnectionFactory."); } } SimpleFactoryConfiguration(); @Override void applyConfiguration(Object cf); KeyValuePairSet getProperties(); void setProperties(KeyValuePairSet extras);  }