You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to handle multiple users and multiple commands from each user.
For example multiple clients are executing put command to the SFTP server, in this case, I want to read the data in the SFTPEventListener class and do some processing.
But I saw that the class instance is shared amongst multiple users and multiple user sessions, due to which I am not able maintain any state inside the SFTPEventListener. Although I can write my own implementation to handle this scenario but it would have been better if there was an implicit handle given in the library.
Motivation
By adding this, concurrent user requests can be implicitly handled in the library.
Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
All the methods in SftpEventListener take the ServerSession as an argument. It should thus be possible to maintain per-session state in the listener. Either maintain a map per session (and register a listener on the session to remove items from the map when a session closes), or add whatever per-session data you want to maintain as an attribute on the session object. Wouldn't that work for your use case?
Description
I need to handle multiple users and multiple commands from each user.
For example multiple clients are executing put command to the SFTP server, in this case, I want to read the data in the
SFTPEventListener
class and do some processing.But I saw that the class instance is shared amongst multiple users and multiple user sessions, due to which I am not able maintain any state inside the
SFTPEventListener
. Although I can write my own implementation to handle this scenario but it would have been better if there was an implicit handle given in the library.Motivation
By adding this, concurrent user requests can be implicitly handled in the library.
Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: