Interface BGPPeerRegistry
- All Known Implementing Classes:
 StrictBGPPeerRegistry
public interface BGPPeerRegistry
Registry that contains configured bgp peers ready for when a bgp session is established with remote peer.
 IP address is uses as a key for configured peers.
- 
Method Summary
Modifier and TypeMethodDescriptionvoidaddPeer(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip, BGPSessionListener peer, BGPSessionPreferences prefs) Add configured peer, its IP address and preferences.getPeer(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone sourceId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone remoteId, Open open) Get configured peer after BGP session was successfully established.getPeerPreferences(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip) Get preferences for a remote peer.booleanisPeerConfigured(@NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip) Check whether peer on provided IP address is present in this registry.@NonNull org.opendaylight.yangtools.concepts.RegistrationregisterPeerRegisterListener(@NonNull PeerRegistryListener listener) Register PeerRegistryListener, which listens to the changes in peer registry (add peer, remove peer).@NonNull org.opendaylight.yangtools.concepts.RegistrationRegister PeerRegistrySessionListener, which listens to the changes in sessions of peers in peer registry (create session, remove session).voidremovePeer(@NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip) Remove configured peer from registry.voidremovePeerSession(@NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip) Remove peer session from registry.voidupdatePeerPreferences(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip, BGPSessionPreferences preferences) Set new preferences. 
- 
Method Details
- 
addPeer
void addPeer(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip, BGPSessionListener peer, BGPSessionPreferences prefs) Add configured peer, its IP address and preferences. To be used when a BGP session is established.- Parameters:
 ip- address of remote peerpeer- configured peer as BGPSessionListenerprefs- session preferences for configured peer
 - 
removePeer
void removePeer(@NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip) Remove configured peer from registry.- Parameters:
 ip- address of remote peer
 - 
removePeerSession
void removePeerSession(@NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip) Remove peer session from registry.- Parameters:
 ip- address of remote peer
 - 
isPeerConfigured
boolean isPeerConfigured(@NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip) Check whether peer on provided IP address is present in this registry.- Parameters:
 ip- address of remote peer- Returns:
 - true if peer is present false otherwise
 
 - 
getPeer
BGPSessionListener getPeer(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone sourceId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone remoteId, Open open) throws BGPDocumentedException Get configured peer after BGP session was successfully established. Called by negotiators.- Parameters:
 ip- address of remote peersourceId- BGP ID of peer that initiated the session (current device or remote peer)remoteId- BGP ID of peer that accepted the session (current device or remote peer)open- remote Open message- Returns:
 - BGPSessionListener configured Peer as BGP listener
 - Throws:
 BGPDocumentedException- if session establishment cannot be finished successfullyIllegalStateException- if there is no peer configured for provided ip address
 - 
getPeerPreferences
BGPSessionPreferences getPeerPreferences(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip) Get preferences for a remote peer.- Parameters:
 ip- address of remote peer- Returns:
 - BGP session preferences for configured peer
 - Throws:
 IllegalStateException- if there is no peer configured for provided ip address
 - 
registerPeerRegisterListener
@NonNull org.opendaylight.yangtools.concepts.Registration registerPeerRegisterListener(@NonNull PeerRegistryListener listener) Register PeerRegistryListener, which listens to the changes in peer registry (add peer, remove peer). After registration, an initial drop is provided by calling onPeerAdded().- Parameters:
 listener- The PeerRegistryListener to be registered.- Returns:
 - Registration ticked, used for closing of registration.
 
 - 
registerPeerSessionListener
@NonNull org.opendaylight.yangtools.concepts.Registration registerPeerSessionListener(PeerRegistrySessionListener listener) Register PeerRegistrySessionListener, which listens to the changes in sessions of peers in peer registry (create session, remove session). After registration, an initial drop is provided by calling onSessionCreated().- Parameters:
 listener- The PeerRegistrySessionListener to be registered.- Returns:
 - Registration ticked, used for closing of registration.
 
 - 
updatePeerPreferences
void updatePeerPreferences(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone ip, BGPSessionPreferences preferences) Set new preferences. In case of graceful restart execution we need to send updated GracefulRestartCapability when sesison re-establish, information which tables where preserved during restart will change. Note that this method only updates preferences of already registered peer. To add new peer to registry use addPeer().- Parameters:
 ip- of neighborpreferences- to send in OPEN message
 
 -