public abstract class GenericPCEPSession extends Thread implements PCEPSession
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected int |
deadTimerLocal
Value of the deadtimer that the PCE sends, so the PCC uses it
If in this time the PCC has not received anything, it closes the session
It is set by the PCE (in this case, the local peer)
|
protected int |
deadTimerPeer
Value of the deadtimer that the PCC sends.
|
protected DeadTimerThread |
deadTimerT
Thread to check if the connection is still alive.
|
protected int |
FSMstate
Finite State Machine of the PCEP protocol
|
protected DataInputStream |
in
DataInputStream to receive messages from PCC
|
protected boolean |
isSessionSRCapable |
protected boolean |
isSessionStateful |
protected int |
keepAliveLocal
Value of the Keepalive timer set by the Local PCE.
|
protected int |
keepAlivePeer
Value of the Keepalive timer of the peer PCC.
|
protected KeepAliveThread |
keepAliveT
Thread to send periodic Keepalives
|
protected boolean |
localOK |
protected PcepCapability |
localPcepCapability
Capabilities of the LOCAL Entity
|
protected org.slf4j.Logger |
log
Logger to write the Parent PCE server log
|
protected byte[] |
msg
Byte array to store the last PCEP message read.
|
protected es.tid.pce.pcep.objects.OPEN |
open
OPEN object of PCEPOpen message.
|
protected int |
openRetry |
protected DataOutputStream |
out
DataOutputStream to send messages to the peer PCC
|
protected PCEPSessionsInformation |
pcepSessionManager
PCEP Session Manager
|
protected PcepCapability |
peerPcepCapability
Capabilities of the Peer Entity
|
protected Inet4Address |
remoteDomainId
Remote Domain ID
null if not sent
|
protected LinkedList<Integer> |
remoteOfCodes
Remote List of OF Codes
If sent by the peer PCE
|
protected boolean |
remoteOK
RemoteOK: a boolean that is set to 1 if the system has received an
acceptable Open message.
|
protected Inet4Address |
remotePCEId
Remote PCE ID Address
null if not sent
|
protected Inet4Address |
remotePeerIP
IP Address of the remote PCEP Peer
|
protected RequestQueue |
req
Queue to send the Computing Path Requests
|
static long |
sessionIdCounter
Initial number of the session ID (internal use only)
|
protected int |
sessionMSD |
protected Socket |
socket
Socket of the communication between PCC and PCE
|
protected Timer |
timer
Timer to schedule KeepWait and OpenWait Timers
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
GenericPCEPSession(PCEPSessionsInformation pcepSessionManager) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancelDeadTimer()
Ends the DeadTimer Thread
|
void |
cancelKeepAlive()
Ends the KeepAlive Thread
|
void |
close(int reason)
Close the PCE session
List of reasons (RFC 5440):
Value Meaning
1 No explanation provided
2 DeadTimer expired
3 Reception of a malformed PCEP message
4 Reception of an unacceptable number of unknown
requests/replies
5 Reception of an unacceptable number of unrecognized
PCEP messages
|
protected void |
endConnections()
Ends current connections
|
protected abstract void |
endSession()
DO HERE ANYTHING NEEDED AT CLOSING??
|
int |
getFSMstate() |
DataOutputStream |
getOut() |
LinkedList<Integer> |
getRemoteOfCodes() |
Inet4Address |
getRemotePCEId() |
Socket |
getSocket() |
protected void |
initializePCEPSession(boolean zeroDeadTimerAccepted,
int minimumKeepAliveTimerAccepted,
int maxDeadTimerAccepted,
boolean isParentPCE,
boolean requestsParentPCE,
Inet4Address domainId,
Inet4Address pceId,
int databaseVersion) |
void |
killSession()
Finish the PCEP Session abruptly,
|
void |
newSessionId() |
protected byte[] |
readMsg(DataInputStream in) |
protected byte[] |
readMsgOptimized(DataInputStream in) |
protected void |
resetDeadTimer()
Resets the DeadTimerThread
To be called every time a message in the session is received
|
void |
sendPCEPMessage(es.tid.pce.pcep.messages.PCEPMessage message) |
protected void |
setFSMstate(int fSMstate) |
void |
setOut(DataOutputStream out) |
void |
setRemotePCEId(Inet4Address remotePCEId) |
String |
shortInfo() |
protected void |
startDeadTimer()
Starts the deadTimerThread
|
void |
startKeepAlive()
Starts the Keep Alive Thread
|
String |
toString() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yieldprotected PcepCapability localPcepCapability
protected PcepCapability peerPcepCapability
protected PCEPSessionsInformation pcepSessionManager
protected KeepAliveThread keepAliveT
protected int keepAliveLocal
protected int keepAlivePeer
protected DeadTimerThread deadTimerT
protected int deadTimerLocal
protected int deadTimerPeer
protected Socket socket
protected Inet4Address remotePeerIP
protected DataOutputStream out
protected DataInputStream in
protected RequestQueue req
protected org.slf4j.Logger log
protected Timer timer
protected int FSMstate
protected Inet4Address remotePCEId
protected Inet4Address remoteDomainId
protected LinkedList<Integer> remoteOfCodes
protected boolean remoteOK
protected boolean localOK
protected int openRetry
protected byte[] msg
public static long sessionIdCounter
protected es.tid.pce.pcep.objects.OPEN open
protected boolean isSessionStateful
protected boolean isSessionSRCapable
protected int sessionMSD
public GenericPCEPSession(PCEPSessionsInformation pcepSessionManager)
protected byte[] readMsg(DataInputStream in) throws IOException
IOExceptionprotected byte[] readMsgOptimized(DataInputStream in) throws IOException
IOExceptionpublic void close(int reason)
Close the PCE session
List of reasons (RFC 5440):
Value Meaning 1 No explanation provided 2 DeadTimer expired 3 Reception of a malformed PCEP message 4 Reception of an unacceptable number of unknown requests/replies 5 Reception of an unacceptable number of unrecognized PCEP messagesclose in interface PCEPSessionreason - Reason for closing the PCEP Sessionpublic DataOutputStream getOut()
public void setOut(DataOutputStream out)
protected void startDeadTimer()
protected void resetDeadTimer()
public Socket getSocket()
protected void cancelDeadTimer()
public void startKeepAlive()
public void cancelKeepAlive()
protected void endConnections()
public int getFSMstate()
protected void setFSMstate(int fSMstate)
public void killSession()
PCEPSessionkillSession in interface PCEPSessionprotected abstract void endSession()
protected void initializePCEPSession(boolean zeroDeadTimerAccepted,
int minimumKeepAliveTimerAccepted,
int maxDeadTimerAccepted,
boolean isParentPCE,
boolean requestsParentPCE,
Inet4Address domainId,
Inet4Address pceId,
int databaseVersion)
public void sendPCEPMessage(es.tid.pce.pcep.messages.PCEPMessage message)
sendPCEPMessage in interface PCEPSessionpublic Inet4Address getRemotePCEId()
public void setRemotePCEId(Inet4Address remotePCEId)
public LinkedList<Integer> getRemoteOfCodes()
public String shortInfo()
public void newSessionId()
Copyright © 2016. All rights reserved.