Menu

#21 ENH: Add TimeOfLastActivity property to Channel

Enhancement_request
open
5
2001-04-08
2000-08-09
Mark Gent
No

Currently if a private chat message is sent to the chat engine, they are processed by a Channel by the name of the nickname of the user. If you then try to reply via this Channel, you will actually send a message to yourself. Instead a new Channel with the name of the nickname of the sender needs to be created.

Maybe for ease of use there is a case for handling private chat channels as a special case (maybe derive a PrivateChannel from Channel?), so that a new bidirectional private Channel is created whenever a previously unknown user sends a private message to the chat engine, and calling sendPrivMsg would send a message straight back to that user.

It would also be useful to have a property on this (or any) Channel recording the local time of the last time the channel was used. This would be useful simply as a property in its own right (I know at least one use of it), as well as for use by a public member function on the Server class to remove all Channels which have not been used in n time (n being a parameter of the function). This way one can do Channel maintenance if one feels the need to. Time can be recorded and compared efficiently as a long using System.currentTimeMillis() (saves on Date or Calendar object creation for every message).

Discussion

  • David M. Johnson

    These are good ideas.

     
  • David M. Johnson

    • assigned_to: nobody --> snoopdave
     
  • David M. Johnson

    • priority: 5 --> 9
     
  • David M. Johnson

    • priority: 9 --> 3
     
  • David M. Johnson

    • summary: Suggestion: maybe private Channels should be bidirectional? --> ENH: Add TimeOfLastActivity property to Channel
     
  • David M. Johnson

    • priority: 3 --> 1
     
  • David M. Johnson

    • priority: 1 --> 5
     

Log in to post a comment.

Auth0 Logo