We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a listener trait to listen to the creation, update and destruction of sessions
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion. Do you have an idea of what the implementation would look like?
Sorry, something went wrong.
I think it should be similar to the listener API of the javaee servlet
trait SessionListener { fn onSessionCreated(self: Self, event: SessionEvent); fn onSessionDestoryed(self: Self, event: SessionEvent); fn onAttributeAdded(self: Self, event: SessionAttributeEvent); fn onAttributeReplaced(self: Self, event: SessionAttributeEvent); fn onAttributeRemoved(self: Self, event: SessionAttributeEvent); }
I suggest a slightly different interface:
pub enum AttributeEvent { Add(AddEvent), Replace(ReplaceEvent), Remove(RemoveEvent) } pub enum SessionEvent { Create(CreateEvent), Destroy(DestroyEvent), Modify(AttributeEvent) } trait SessionListener { fn onEvent(&self, event: SessionEvent); }
No branches or pull requests
Add a listener trait to listen to the creation, update and destruction of sessions
The text was updated successfully, but these errors were encountered: