Interface PCEPSession

All Superinterfaces:
AutoCloseable, PCEPSessionState
All Known Implementing Classes:
PCEPSessionImpl

public interface PCEPSession extends PCEPSessionState, AutoCloseable
PCEP Session represents the finite state machine in PCEP, including timers and its purpose is to create a PCEP connection between PCE/PCC. Session is automatically started, when TCP connection is created, but can be stopped manually. If the session is up, it has to redirect messages to/from user. Handles also malformed messages and unknown requests.
  • Method Details

    • sendMessage

      io.netty.util.concurrent.Future<Void> sendMessage(Message message)
      Sends message from user to PCE/PCC. If the user sends an Open Message, the session returns an error (open message is only allowed, when a PCEP handshake is in progress). Close message will close the session and free all the resources.
      Parameters:
      message - message to be sent
      Returns:
      Future promise which will be succeed when the message is enqueued in the socket.
    • close

      void close(TerminationReason reason)
    • getRemoteTlvs

      Tlvs getRemoteTlvs()
      Returns session characteristics of the remote PCEP Speaker.
      Returns:
      Open message TLVs
    • getRemoteAddress

      @NonNull InetAddress getRemoteAddress()
      Returns remote address.
      Returns:
      inet address
    • getLocalTlvs

      Tlvs getLocalTlvs()
      Returns session characteristics of the local PCEP Speaker.
      Returns:
      Open message TLVs
    • localSessionCharacteristics

      @Deprecated default Tlvs localSessionCharacteristics()
      Deprecated.
      Returns session characteristics of the local PCEP Speaker.
      Returns:
      Open message TLVs