Class DefaultFileHandler

  • All Implemented Interfaces:
    FileHandler

    public class DefaultFileHandler
    extends java.lang.Object
    implements FileHandler
    • Constructor Detail

      • DefaultFileHandler

        public DefaultFileHandler()
      • DefaultFileHandler

        public DefaultFileHandler​(Client client)
    • Method Detail

      • uploadFileAsync

        public void uploadFileAsync​(@NotNull
                                    @NotNull java.lang.String channelType,
                                    @NotNull
                                    @NotNull java.lang.String channelId,
                                    @NotNull
                                    @NotNull java.lang.String userId,
                                    @Nullable
                                    @Nullable java.io.File file,
                                    @Nullable
                                    @Nullable java.lang.String contentType,
                                    @Nullable
                                    @Nullable java.util.function.Consumer<Message.MessageUploadFileResponse> onSuccess,
                                    @Nullable
                                    @Nullable java.util.function.Consumer<StreamException> onError)
        Specified by:
        uploadFileAsync in interface FileHandler
      • uploadImageAsync

        public void uploadImageAsync​(@NotNull
                                     @NotNull java.lang.String channelType,
                                     @NotNull
                                     @NotNull java.lang.String channelId,
                                     @NotNull
                                     @NotNull java.lang.String userId,
                                     @Nullable
                                     @Nullable java.io.File file,
                                     @Nullable
                                     @Nullable java.lang.String contentType,
                                     @Nullable
                                     @Nullable java.util.List<Message.ImageSizeRequestObject> uploadSizes,
                                     @Nullable
                                     @Nullable java.util.function.Consumer<Message.MessageUploadImageResponse> onSuccess,
                                     @Nullable
                                     @Nullable java.util.function.Consumer<StreamException> onError)
        Specified by:
        uploadImageAsync in interface FileHandler
      • deleteFileAsync

        public void deleteFileAsync​(@NotNull
                                    @NotNull java.lang.String channelType,
                                    @NotNull
                                    @NotNull java.lang.String channelId,
                                    @NotNull
                                    @NotNull java.lang.String url,
                                    @Nullable
                                    @Nullable java.util.function.Consumer<StreamResponseObject> onSuccess,
                                    @Nullable
                                    @Nullable java.util.function.Consumer<StreamException> onError)
        Specified by:
        deleteFileAsync in interface FileHandler
      • deleteImageAsync

        public void deleteImageAsync​(@NotNull
                                     @NotNull java.lang.String channelType,
                                     @NotNull
                                     @NotNull java.lang.String channelId,
                                     @NotNull
                                     @NotNull java.lang.String url,
                                     @Nullable
                                     @Nullable java.util.function.Consumer<StreamResponseObject> onSuccess,
                                     @Nullable
                                     @Nullable java.util.function.Consumer<StreamException> onError)
        Specified by:
        deleteImageAsync in interface FileHandler