Interface MessageService

All Known Implementing Classes:
MessageServiceImpl

public interface MessageService
Service interface for managing messages within the application.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves all messages.
    sendMessage(jakarta.servlet.http.HttpServletRequest request, String receiverName, String content)
    Sends a message to a specified receiver.
  • Method Details

    • getMessages

      List<Message> getMessages()
      Retrieves all messages.
      Returns:
      a list of messages
    • sendMessage

      Message sendMessage(jakarta.servlet.http.HttpServletRequest request, String receiverName, String content) throws Exception
      Sends a message to a specified receiver.
      Parameters:
      request - the HTTP request containing context information
      receiverName - the name of the message receiver
      content - the content of the message to be sent
      Returns:
      the sent Message object
      Throws:
      Exception - if there is an error while sending the message