Interface BGPSession

  • All Superinterfaces:
    AutoCloseable, io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler
    All Known Implementing Classes:
    BGPSessionImpl

    public interface BGPSession
    extends AutoCloseable, io.netty.channel.ChannelInboundHandler
    BGP Session represents the finite state machine in BGP, including timers and its purpose is to create a BGP connection between BGP speakers. Session is automatically started, when TCP connection is created, but can be stopped manually via close method of the Closeable interface. If the session is up, it has to redirect messages to/from user. Handles also malformed messages and unknown requests.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      <T extends PeerConstraint>
      void
      addDecoderConstraint​(Class<T> constraintClass, T constraint)
      Add peer constraint to session pipeline decoder.
      void closeWithoutMessage()
      Close peer session without sending Notification message.
      @NonNull List<AddressFamilies> getAdvertisedAddPathTableTypes()
      Return a list with Add Path tables supported advertised and corresponding SendReceive mode.
      default @NonNull GracefulRestartCapability getAdvertisedGracefulRestartCapability()
      Return advertised graceful capability containing the list of tables which the peer has advertised to support, restart time and restarting flags.
      default @NonNull LlGracefulRestartCapability getAdvertisedLlGracefulRestartCapability()
      Return advertised long-lived graceful capability containing the list of tables with stale time which the peer has advertised to support.
      @NonNull Set<BgpTableType> getAdvertisedTableTypes()
      Return the list of tables which the peer has advertised to support.
      @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber getAsNumber()
      Return the AS number which the peer advertises.
      @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address getBgpId()
      Return the BGP router ID advertised by the peer.
      io.netty.util.concurrent.ScheduledFuture<?> schedule​(Runnable command, long delay, TimeUnit unit)
      Schedule a task to be executed in the context of the session handling thread.
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
      • Methods inherited from interface io.netty.channel.ChannelInboundHandler

        channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
    • Method Detail

      • getAdvertisedTableTypes

        @NonNull Set<BgpTableType> getAdvertisedTableTypes()
        Return the list of tables which the peer has advertised to support.
        Returns:
        Set of tables which it supports.
      • getBgpId

        @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address getBgpId()
        Return the BGP router ID advertised by the peer.
        Returns:
        Peer's BGP Router ID.
      • getAsNumber

        @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber getAsNumber()
        Return the AS number which the peer advertises.
        Returns:
        Peer's AS Number
      • getAdvertisedAddPathTableTypes

        @NonNull List<AddressFamilies> getAdvertisedAddPathTableTypes()
        Return a list with Add Path tables supported advertised and corresponding SendReceive mode.
        Returns:
        AddPathTables supported
      • getAdvertisedGracefulRestartCapability

        default @NonNull GracefulRestartCapability getAdvertisedGracefulRestartCapability()
        Return advertised graceful capability containing the list of tables which the peer has advertised to support, restart time and restarting flags.
        Returns:
        Advertised graceful restart capability.
      • getAdvertisedLlGracefulRestartCapability

        default @NonNull LlGracefulRestartCapability getAdvertisedLlGracefulRestartCapability()
        Return advertised long-lived graceful capability containing the list of tables with stale time which the peer has advertised to support.
        Returns:
        Advertised long-lived graceful restart capability.
      • closeWithoutMessage

        void closeWithoutMessage()
        Close peer session without sending Notification message.
      • addDecoderConstraint

        <T extends PeerConstraint> void addDecoderConstraint​(Class<T> constraintClass,
                                                             T constraint)
        Add peer constraint to session pipeline decoder.
      • schedule

        io.netty.util.concurrent.ScheduledFuture<?> schedule​(Runnable command,
                                                             long delay,
                                                             TimeUnit unit)
        Schedule a task to be executed in the context of the session handling thread.
        Parameters:
        command - the task to execute
        delay - the time from now to delay execution
        unit - the time unit of the delay parameter
        Returns:
        Future representing the scheduled task.