Interface ServerMulticast
public interface ServerMulticast
Multicast message sent by the
Desktop backend server.-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the bytes of the attachment of this Server Multicast.Returns the MIME type of the attachement of this Server Multicast.getID()Returns the identification of this Server Multicast.Returns the message of this Server Multicast.getName()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.voidSends all the files in given directory whose names match a glob pattern.voidsendResponse(String message) Sends a partial or final response message with no attachment data.voidsendResponse(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
nullif no MIME type available.
-
getAttachment
-
sendResponse
Sends a partial or final response message with no attachment data.- Parameters:
message- the message of this partial or final response.- Throws:
NullPointerException- ifmessageisnull.Exception- if another error occurs.
-
sendResponse
Sends a partial or final response message with attachment data. The argumentsattachmentTypeandattachmentcan be bothnull, but if one is provided (notnull) 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- ifmessageisnull.IllegalArgumentException- if attachment and type are invalid.Exception- if another error occurs.
-
sendFiles
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 isnull.IllegalArgumentException- ifpathis not a directory.IOException- if an I/O error occurs.Exception- if another error occurs.- See Also:
-