diff --git a/src/java/org/rapidcontext/core/type/Session.java b/src/java/org/rapidcontext/core/type/Session.java index e9da7b47..b58bc2d3 100644 --- a/src/java/org/rapidcontext/core/type/Session.java +++ b/src/java/org/rapidcontext/core/type/Session.java @@ -375,6 +375,20 @@ public Date destroyTime() { return dict.getDate(KEY_DESTROY_TIME, new Date(Math.min(access, create))); } + /** + * Sets the scheduled session destruction timestamp. + * + * @param date the destruction timestamp, or null for default + */ + public void setDestroyTime(Date date) { + if (date == null) { + dict.remove(KEY_DESTROY_TIME); + } else { + dict.set(KEY_DESTROY_TIME, date); + } + modified = true; + } + /** * Returns the session last access timestamp. *