Class EventManager

java.lang.Object
nl.andrewl.concord_server.event.EventManager

public class EventManager extends Object
The event manager is responsible for the server's ability to respond to various client requests.
  • Field Details

  • Constructor Details

  • Method Details

    • handle

      public <T extends nl.andrewl.concord_core.msg.Message> void handle(T message, ClientThread client)
      Handles a new message that was sent from a client. Tries to find an appropriate handler for the message, and if one is found, calls the MessageHandler.handle(Message, ClientThread, ConcordServer) method on it.

      Note that it is expected that client threads will invoke this method during their ClientThread.run() method, so concurrent invocation is expected.

      Type Parameters:
      T - The type of message.
      Parameters:
      message - The message that was sent by a client.
      client - The client thread that is used for communicating with the client.