Interface ServerMulticast


public interface ServerMulticast
Multicast message sent by the Desktop backend server.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns the bytes of the attachment of this Server Multicast.
    Returns the MIME type of the attachement of this Server Multicast.
    Returns the identification of this Server Multicast.
    Returns the message of this Server Multicast.
    Returns the name of this Server Multicast.
    Returns the valid-from date/time this Server Multicast.
    Returns the valid-to date/time this Server Multicast.
    void
    sendFiles(Path path, String glob, String mimeType)
    Sends all the files in given directory whose names match a glob pattern.
    void
    Sends a partial or final response message with no attachment data.
    void
    sendResponse(String message, String attachmentType, byte[] attachment)
    Sends a partial or final response message with attachment data.
  • Method Details

    • getID

      BigDecimal getID()
      Returns the identification of this Server Multicast.
      Returns:
      the identification of this Server Multicast.
    • getName

      String getName()
      Returns the name of this Server Multicast.
      Returns:
      the name of this Server Multicast.
    • getValidFrom

      LocalDateTime getValidFrom()
      Returns the valid-from date/time this Server Multicast.
      Returns:
      the valid-from date/time this Server Multicast.
    • getValidTo

      LocalDateTime getValidTo()
      Returns the valid-to date/time this Server Multicast.
      Returns:
      the valid-to date/time this Server Multicast.
    • getMessage

      String getMessage()
      Returns the message of this Server Multicast.
      Returns:
      the message of this Server Multicast.
    • getAttachmentType

      String getAttachmentType()
      Returns the MIME type of the attachement of this Server Multicast.
      Returns:
      the MIME type or null if no MIME type available.
    • getAttachment

      byte[] getAttachment() throws Exception
      Returns the bytes of the attachment of this Server Multicast.
      Returns:
      the bytes or null if no bytes available.
      Throws:
      Exception - if an error occurs obtaining the bytes.
    • sendResponse

      void sendResponse(String message) throws Exception
      Sends a partial or final response message with no attachment data.
      Parameters:
      message - the message of this partial or final response.
      Throws:
      NullPointerException - if message is null.
      Exception - if another error occurs.
    • sendResponse

      void sendResponse(String message, String attachmentType, byte[] attachment) throws Exception
      Sends a partial or final response message with attachment data. The arguments attachmentType and attachment can be both null, but if one is provided (not null) then the other must also be provided.
      Parameters:
      message - the message of this partial or final response.
      attachmentType - the type of the attachment data (can be null).
      attachment - the attachment data of this response (can be null).
      Throws:
      NullPointerException - if message is null.
      IllegalArgumentException - if attachment and type are invalid.
      Exception - if another error occurs.
    • sendFiles

      void sendFiles(Path path, String glob, String mimeType) throws IOException, Exception
      Sends all the files in given directory whose names match a glob pattern.
      Parameters:
      path - the path to the directory where to look for files.
      glob - the glob pattern used to select the files.
      mimeType - the MIME type of the selected files (can be null).
      Throws:
      NullPointerException - if an argument is null.
      IllegalArgumentException - if path is not a directory.
      IOException - if an I/O error occurs.
      Exception - if another error occurs.
      See Also: