@Test public void testGetSpeakerWithName() throws Exception { assertNotNull(bgpConfig.getSpeakerWithName("bgp1")); assertNull(bgpConfig.getSpeakerWithName("bgp2")); }
public BgpSpeakerConfig getSpeakerWithName(String name) { for (BgpConfig.BgpSpeakerConfig speaker : bgpSpeakers()) { if (speaker.name().filter(name::equals).isPresent()) { return speaker; } } return null; }
BgpConfig extends Config<ApplicationId> { public BgpSpeakerConfig getSpeakerWithName(String name) { for (BgpConfig.BgpSpeakerConfig speaker : bgpSpeakers()) { if (speaker.name().filter(name::equals).isPresent()) { return speaker; } } return null; } }
BgpConfig extends Config<ApplicationId> { public BgpSpeakerConfig getSpeakerWithName(String name) { for (BgpConfig.BgpSpeakerConfig speaker : bgpSpeakers()) { if (speaker.name().filter(name::equals).isPresent()) { return speaker; } } return null; }  }
BgpConfig extends Config<ApplicationId> { public BgpSpeakerConfig getSpeakerWithName(String name) { for (BgpConfig.BgpSpeakerConfig speaker : bgpSpeakers()) { if (speaker.name().filter(name::equals).isPresent()) { return speaker; } } return null; }  Set<BgpSpeakerConfig> bgpSpeakers(); BgpSpeakerConfig getSpeakerWithName(String name); void addSpeaker(BgpSpeakerConfig speaker); void removeSpeaker(String speakerName); void addPeerToSpeaker(String speakerName, IpAddress peerAddress); BgpSpeakerConfig getSpeakerFromPeer(IpAddress peerAddress); void removePeerFromSpeaker(BgpSpeakerConfig speaker, IpAddress peerAddress); }
BgpConfig extends Config<ApplicationId> { public BgpSpeakerConfig getSpeakerWithName(String name) { for (BgpConfig.BgpSpeakerConfig speaker : bgpSpeakers()) { if (speaker.name().filter(name::equals).isPresent()) { return speaker; } } return null; }  Set<BgpSpeakerConfig> bgpSpeakers(); BgpSpeakerConfig getSpeakerWithName(String name); void addSpeaker(BgpSpeakerConfig speaker); void removeSpeaker(String speakerName); void addPeerToSpeaker(String speakerName, IpAddress peerAddress); BgpSpeakerConfig getSpeakerFromPeer(IpAddress peerAddress); void removePeerFromSpeaker(BgpSpeakerConfig speaker, IpAddress peerAddress); static final String SPEAKERS; static final String CONNECT_POINT; static final String NAME; static final String PEERS; static final String VLAN; }