public interface

EngagementFile

com.glia.androidsdk.engagement.EngagementFile

Summary

Nested Classes
class EngagementFile.Events  
interface EngagementFile.FileEvent<T>  
enum EngagementFile.ScanResult File security scan result status  
Public Methods
abstract String getId()
abstract boolean isSecurityScanRequired()
abstract <T> void off(FileEvent<T> event, Consumer<T> listener)
Removes event listeners from the EngagementFile.
abstract <T> void off(FileEvent<T> event)
Removes all event listeners from EngagementFile.
abstract <T> void on(FileEvent<T> event, Consumer<T> listener)
Registers event listeners for EngagementFile.

Public Methods

public abstract String getId ()

Returns
  • UUID of the file

public abstract boolean isSecurityScanRequired ()

Returns
  • If the value of this field is true, uploader must wait for the security scan event to arrive before they can send the file as a part of a chat message. Additionally, the scan result must be clean in order to send the file.

public abstract void off (FileEvent<T> event, Consumer<T> listener)

Removes event listeners from the EngagementFile.

If an event listener is removed while the EngagementFile is processing an event, it is not triggered with the current event.

Calling off with arguments which do not identify any currently registered listener has no effect.

Parameters
event One of EngagementFile.Events
listener Event listener to remove

public abstract void off (FileEvent<T> event)

Removes all event listeners from EngagementFile.

Behaves the same way as off(FileEvent, Consumer) but removes all listeners of specified type

Parameters
event One of EngagementFile.Events

public abstract void on (FileEvent<T> event, Consumer<T> listener)

Registers event listeners for EngagementFile.

If a listener is added while the EngagementFile is processing an event, it is not triggered with the current event.

If multiple identical listeners are registered on the same event type the duplicate instances are discarded. They do not cause the listener to be called twice and do not need to be removed with the off(EngagementFile.FileEvent) method.

Parameters
event One of EngagementFile.Events
listener Event listener to register