Skip to content

Add SessionID to SessionStateListener methods #365

@esanchezros

Description

@esanchezros

Apologies if this has been requested already but I think it will be great if the methods on SessionStateListener interface would accept the Session or the SessionID to identify which session has produced the event. At the moment, I have to pass the session to the state listener when adding the state listener to the session:

((SessionConnector) clientInitiator).getManagedSessions()
		.forEach(session -> session.addStateListener(new MonitoringSessionStateListener(session)));

...

public class MonitoringSessionStateListener implements SessionStateListener {

	private final Session session;

	MonitoringSessionStateListener(Session session) {
		this.session = session;
	}

Thanks
Ed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions