Class DefaultFileHandler
- java.lang.Object
-
- io.getstream.chat.java.models.framework.DefaultFileHandler
-
- All Implemented Interfaces:
FileHandler
public class DefaultFileHandler extends java.lang.Object implements FileHandler
-
-
Constructor Summary
Constructors Constructor Description DefaultFileHandler()DefaultFileHandler(Client client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamResponseObjectdeleteFile(@NotNull java.lang.String channelType, @NotNull java.lang.String channelId, @NotNull java.lang.String url)voiddeleteFileAsync(@NotNull java.lang.String channelType, @NotNull java.lang.String channelId, @NotNull java.lang.String url, @Nullable java.util.function.Consumer<StreamResponseObject> onSuccess, @Nullable java.util.function.Consumer<StreamException> onError)StreamResponseObjectdeleteImage(@NotNull java.lang.String channelType, @NotNull java.lang.String channelId, @NotNull java.lang.String url)voiddeleteImageAsync(@NotNull java.lang.String channelType, @NotNull java.lang.String channelId, @NotNull java.lang.String url, @Nullable java.util.function.Consumer<StreamResponseObject> onSuccess, @Nullable java.util.function.Consumer<StreamException> onError)Message.MessageUploadFileResponseuploadFile(@NotNull java.lang.String channelType, @NotNull java.lang.String channelId, @NotNull java.lang.String userId, @Nullable java.io.File file, @Nullable java.lang.String contentType)voiduploadFileAsync(@NotNull java.lang.String channelType, @NotNull java.lang.String channelId, @NotNull java.lang.String userId, @Nullable java.io.File file, @Nullable java.lang.String contentType, @Nullable java.util.function.Consumer<Message.MessageUploadFileResponse> onSuccess, @Nullable java.util.function.Consumer<StreamException> onError)Message.MessageUploadImageResponseuploadImage(@NotNull java.lang.String channelType, @NotNull java.lang.String channelId, @NotNull java.lang.String userId, @Nullable java.io.File file, @Nullable java.lang.String contentType, @Nullable java.util.List<Message.ImageSizeRequestObject> uploadSizes)voiduploadImageAsync(@NotNull java.lang.String channelType, @NotNull java.lang.String channelId, @NotNull java.lang.String userId, @Nullable java.io.File file, @Nullable java.lang.String contentType, @Nullable java.util.List<Message.ImageSizeRequestObject> uploadSizes, @Nullable java.util.function.Consumer<Message.MessageUploadImageResponse> onSuccess, @Nullable java.util.function.Consumer<StreamException> onError)
-
-
-
Constructor Detail
-
DefaultFileHandler
public DefaultFileHandler()
-
DefaultFileHandler
public DefaultFileHandler(Client client)
-
-
Method Detail
-
uploadFile
public Message.MessageUploadFileResponse uploadFile(@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) throws StreamException
- Specified by:
uploadFilein interfaceFileHandler- Throws:
StreamException
-
uploadImage
public Message.MessageUploadImageResponse uploadImage(@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) throws StreamException
- Specified by:
uploadImagein interfaceFileHandler- Throws:
StreamException
-
deleteFile
public StreamResponseObject deleteFile(@NotNull @NotNull java.lang.String channelType, @NotNull @NotNull java.lang.String channelId, @NotNull @NotNull java.lang.String url) throws StreamException
- Specified by:
deleteFilein interfaceFileHandler- Throws:
StreamException
-
deleteImage
public StreamResponseObject deleteImage(@NotNull @NotNull java.lang.String channelType, @NotNull @NotNull java.lang.String channelId, @NotNull @NotNull java.lang.String url) throws StreamException
- Specified by:
deleteImagein interfaceFileHandler- Throws:
StreamException
-
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:
uploadFileAsyncin interfaceFileHandler
-
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:
uploadImageAsyncin interfaceFileHandler
-
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:
deleteFileAsyncin interfaceFileHandler
-
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:
deleteImageAsyncin interfaceFileHandler
-
-