public interface ServerMulticast
Desktop
backend server.Modifier and Type | Method and Description |
---|---|
byte[] |
getAttachment()
Returns the bytes of the attachment of this Server Multicast.
|
String |
getAttachmentType()
Returns the MIME type of the attachement of this Server Multicast.
|
BigDecimal |
getID()
Returns the identification of this Server Multicast.
|
String |
getMessage()
Returns the message of this Server Multicast.
|
String |
getName()
Returns the name of this Server Multicast.
|
LocalDateTime |
getValidFrom()
Returns the valid-from date/time this Server Multicast.
|
LocalDateTime |
getValidTo()
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 |
sendResponse(String message)
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.
|
BigDecimal getID()
String getName()
LocalDateTime getValidFrom()
LocalDateTime getValidTo()
String getMessage()
String getAttachmentType()
null
if no MIME type available.byte[] getAttachment() throws Exception
null
if no bytes available.Exception
- if an error occurs obtaining the bytes.void sendResponse(String message) throws Exception
message
- the message of this partial or final response.NullPointerException
- if message
is null
.Exception
- if another error occurs.void sendResponse(String message, String attachmentType, byte[] attachment) throws Exception
attachmentType
and attachment
can be both
null
, but if one is provided (not null
) then the other
must also be provided.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).NullPointerException
- if message
is null
.IllegalArgumentException
- if attachment and type are invalid.Exception
- if another error occurs.void sendFiles(Path path, String glob, String mimeType) throws IOException, Exception
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).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.Files.newDirectoryStream(Path, String)
Copyright © OBCOM INGENIERIA S.A. (Chile). All Rights Reserved.