@Test public void testSetConfiguration() throws Throwable { BSHRequestListener bSHRequestListener = new BSHRequestListener(); Configuration cfg = new SimpleConfiguration(); bSHRequestListener.setConfiguration(cfg); assertEquals(1, bSHRequestListener.whitelist.size(), "bSHRequestListener.whitelist.size()"); assertEquals(0, bSHRequestListener.bshSource.length, "bSHRequestListener.bshSource.length"); assertSame(cfg, bSHRequestListener.cfg, "bSHRequestListener.cfg"); }
public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; bshSource = cfg.getAll ("source"); String[] mti = cfg.get ("whitelist", "*").split(","); whitelist = new HashSet<>( Arrays.asList(mti) ); }
BSHRequestListener extends Log implements ISORequestListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; bshSource = cfg.getAll ("source"); String[] mti = cfg.get ("whitelist", "*").split(","); whitelist = new HashSet<>( Arrays.asList(mti) ); } }
BSHRequestListener extends Log implements ISORequestListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; bshSource = cfg.getAll ("source"); String[] mti = cfg.get ("whitelist", "*").split(","); whitelist = new HashSet<>( Arrays.asList(mti) ); } BSHRequestListener(); }
BSHRequestListener extends Log implements ISORequestListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; bshSource = cfg.getAll ("source"); String[] mti = cfg.get ("whitelist", "*").split(","); whitelist = new HashSet<>( Arrays.asList(mti) ); } BSHRequestListener(); void setConfiguration(Configuration cfg); boolean process(ISOSource source, ISOMsg m); }
BSHRequestListener extends Log implements ISORequestListener, Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { this.cfg = cfg; bshSource = cfg.getAll ("source"); String[] mti = cfg.get ("whitelist", "*").split(","); whitelist = new HashSet<>( Arrays.asList(mti) ); } BSHRequestListener(); void setConfiguration(Configuration cfg); boolean process(ISOSource source, ISOMsg m);  }