Interface MessagingSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface MessagingSession extends OsidSession

This session provides a means to send messages.

  • Method Details

    • canSendMessages

      boolean canSendMessages()
      Tests if this user can send messages. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer message operations to unauthorized users.
      Returns:
      false if sending messages is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • sendMessage

      void sendMessage(Id messageId, Id recipientIdList) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Sends a Message .
      Parameters:
      messageId - the Id of the Message
      recipientIdList - list of resource or agent recipients
      Throws:
      NotFoundException - messageId is not found
      NullArgumentException - messageId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getUnsentMessages

      Gets all Messages not sent by the resource related to the authenticated agent. In plenary mode, the returned list contains all known unrad messages or an error results. Otherwise, the returned list may contain only those messages that are accessible through this session.
      Returns:
      a list of unsent Messages
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.