io.getstream.chat.java.models.framework.FileHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stream-chat-java-all Show documentation
Show all versions of stream-chat-java-all Show documentation
Stream Chat Java Client for backend integrations
package io.getstream.chat.java.models.framework;
import io.getstream.chat.java.exceptions.StreamException;
import io.getstream.chat.java.models.Message.ImageSizeRequestObject;
import io.getstream.chat.java.models.Message.MessageUploadFileResponse;
import io.getstream.chat.java.models.Message.MessageUploadImageResponse;
import java.io.File;
import java.util.List;
import java.util.function.Consumer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface FileHandler {
MessageUploadFileResponse uploadFile(
@NotNull String channelType,
@NotNull String channelId,
@NotNull String userId,
@Nullable File file,
@Nullable String contentType)
throws StreamException;
MessageUploadImageResponse uploadImage(
@NotNull String channelType,
@NotNull String channelId,
@NotNull String userId,
@Nullable File file,
@Nullable String contentType,
@Nullable List uploadSizes)
throws StreamException;
StreamResponseObject deleteFile(
@NotNull String channelType, @NotNull String channelId, @NotNull String url)
throws StreamException;
StreamResponseObject deleteImage(
@NotNull String channelType, @NotNull String channelId, @NotNull String url)
throws StreamException;
void uploadFileAsync(
@NotNull String channelType,
@NotNull String channelId,
@NotNull String userId,
@Nullable File file,
@Nullable String contentType,
@Nullable Consumer onSuccess,
@Nullable Consumer onError);
void uploadImageAsync(
@NotNull String channelType,
@NotNull String channelId,
@NotNull String userId,
@Nullable File file,
@Nullable String contentType,
@Nullable List uploadSizes,
@Nullable Consumer onSuccess,
@Nullable Consumer onError);
void deleteFileAsync(
@NotNull String channelType,
@NotNull String channelId,
@NotNull String url,
@Nullable Consumer onSuccess,
@Nullable Consumer onError);
void deleteImageAsync(
@NotNull String channelType,
@NotNull String channelId,
@NotNull String url,
@Nullable Consumer onSuccess,
@Nullable Consumer onError);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy