Package org.opendaylight.protocol.pcep
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 Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
close(TerminationReason reason)
Tlvs
getLocalTlvs()
Returns session characteristics of the local PCEP Speaker.@NonNull InetAddress
getRemoteAddress()
Returns remote address.Tlvs
getRemoteTlvs()
Returns session characteristics of the remote PCEP Speaker.default Tlvs
localSessionCharacteristics()
Deprecated.io.netty.util.concurrent.Future<Void>
sendMessage(Message message)
Sends message from user to PCE/PCC.-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface org.opendaylight.protocol.pcep.PCEPSessionState
getLocalOpen, getLocalPref, getMessages, getPeerPref
-
-
-
-
Method Detail
-
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
-
-