Package org.drasyl.node.handler.crypto
Class Session
- java.lang.Object
-
- org.drasyl.node.handler.crypto.Session
-
public class Session extends Object
This class holds the current (long time/session | active/inactive/stale)Agreements
between two nodes.
-
-
Constructor Summary
Constructors Constructor Description Session(Agreement longTimeAgreement, int maxAgreements, Duration sessionExpireTime)
Session(Agreement longTimeAgreement, ConcurrentReference<PendingAgreement> currentInactiveAgreement, int maxAgreements, Duration sessionExpireTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConcurrentReference<Agreement>
getCurrentActiveAgreement()
ConcurrentReference<PendingAgreement>
getCurrentInactiveAgreement()
Map<AgreementId,Agreement>
getInitializedAgreements()
long
getLastKeyExchangeAt()
long
getLastRenewAttemptAt()
Agreement
getLongTimeAgreement()
void
setLastKeyExchangeAt(long lastKeyExchangeAt)
void
setLastRenewAttemptAt(long lastRenewAttemptAt)
-
-
-
Constructor Detail
-
Session
public Session(Agreement longTimeAgreement, ConcurrentReference<PendingAgreement> currentInactiveAgreement, int maxAgreements, Duration sessionExpireTime)
-
-
Method Detail
-
getInitializedAgreements
public Map<AgreementId,Agreement> getInitializedAgreements()
-
getCurrentActiveAgreement
public ConcurrentReference<Agreement> getCurrentActiveAgreement()
-
getCurrentInactiveAgreement
public ConcurrentReference<PendingAgreement> getCurrentInactiveAgreement()
-
getLastKeyExchangeAt
public long getLastKeyExchangeAt()
-
setLastKeyExchangeAt
public void setLastKeyExchangeAt(long lastKeyExchangeAt)
-
getLastRenewAttemptAt
public long getLastRenewAttemptAt()
-
setLastRenewAttemptAt
public void setLastRenewAttemptAt(long lastRenewAttemptAt)
-
getLongTimeAgreement
public Agreement getLongTimeAgreement()
-
-