@Test public void testAddConnections() throws Exception { SharedComponentList list = new SharedComponentList(); try { list.addConnections(Arrays.asList(new AdaptrisConnection[] {new MockConnection(getName()), new MockConnection()})); fail(); } catch (IllegalArgumentException expected) { } assertEquals(0, list.getConnections().size()); try { list.addConnections(null); fail(); } catch (IllegalArgumentException expected) { } assertEquals(0, list.getConnections().size()); Collection<AdaptrisConnection> rejected = list.addConnections(Arrays.asList(new AdaptrisConnection[] {new MockConnection(getName()), new MockConnection(getName())})); assertEquals(1, list.getConnections().size()); assertEquals(1, rejected.size()); }
public Collection<AdaptrisConnection> addConnections(Collection<AdaptrisConnection> coll) { verifyHasUniqueId(Args.notNull(coll, "connections")); return doAddConnections(coll); }
SharedComponentList implements ComponentLifecycle, ComponentLifecycleExtension { public Collection<AdaptrisConnection> addConnections(Collection<AdaptrisConnection> coll) { verifyHasUniqueId(Args.notNull(coll, "connections")); return doAddConnections(coll); } }
SharedComponentList implements ComponentLifecycle, ComponentLifecycleExtension { public Collection<AdaptrisConnection> addConnections(Collection<AdaptrisConnection> coll) { verifyHasUniqueId(Args.notNull(coll, "connections")); return doAddConnections(coll); } SharedComponentList(); }
SharedComponentList implements ComponentLifecycle, ComponentLifecycleExtension { public Collection<AdaptrisConnection> addConnections(Collection<AdaptrisConnection> coll) { verifyHasUniqueId(Args.notNull(coll, "connections")); return doAddConnections(coll); } SharedComponentList(); List<AdaptrisConnection> getConnections(); void setConnections(List<AdaptrisConnection> l); List<Service> getServices(); void setServices(List<Service> serviceLists); @Override void init(); @Override void start(); @Override void stop(); @Override void close(); @Override void prepare(); void bindJNDI(String componentId); Collection<String> getConnectionIds(); Collection<String> getServiceIds(); boolean addService(Service c); Collection<Service> addServices(Collection<Service> coll); boolean addConnection(AdaptrisConnection c); Collection<AdaptrisConnection> addConnections(Collection<AdaptrisConnection> coll); Collection<AdaptrisConnection> removeConnection(String id); Collection<Service> removeService(String id); boolean containsConnection(String id); boolean containsService(String id); Boolean getDebug(); void setDebug(Boolean debug); SharedComponentLifecycleStrategy getLifecycleStrategy(); void setLifecycleStrategy(SharedComponentLifecycleStrategy ls); TransactionManager getTransactionManager(); void setTransactionManager(TransactionManager tm); }
SharedComponentList implements ComponentLifecycle, ComponentLifecycleExtension { public Collection<AdaptrisConnection> addConnections(Collection<AdaptrisConnection> coll) { verifyHasUniqueId(Args.notNull(coll, "connections")); return doAddConnections(coll); } SharedComponentList(); List<AdaptrisConnection> getConnections(); void setConnections(List<AdaptrisConnection> l); List<Service> getServices(); void setServices(List<Service> serviceLists); @Override void init(); @Override void start(); @Override void stop(); @Override void close(); @Override void prepare(); void bindJNDI(String componentId); Collection<String> getConnectionIds(); Collection<String> getServiceIds(); boolean addService(Service c); Collection<Service> addServices(Collection<Service> coll); boolean addConnection(AdaptrisConnection c); Collection<AdaptrisConnection> addConnections(Collection<AdaptrisConnection> coll); Collection<AdaptrisConnection> removeConnection(String id); Collection<Service> removeService(String id); boolean containsConnection(String id); boolean containsService(String id); Boolean getDebug(); void setDebug(Boolean debug); SharedComponentLifecycleStrategy getLifecycleStrategy(); void setLifecycleStrategy(SharedComponentLifecycleStrategy ls); TransactionManager getTransactionManager(); void setTransactionManager(TransactionManager tm);  }