Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: implement inbox streaming api #9

Merged
merged 8 commits into from
Dec 11, 2024

Conversation

djenczewski
Copy link
Member

@djenczewski djenczewski commented Dec 10, 2024

Description

Closes #4

PrivMX Endpoint Extra

ADDITIONS

  1. New Inbox File Streaming classes:
    • InboxFileStream - Base class for streaming files to Inbox.
    • InboxFileStreamReader - Implements methods that simplify the process of reading files from Inbox and writing to an OutputStream.
    • InboxFileStreamWriter - Implements methods that simplify the process of writing files to Inbox and reading from an InputStream.
  2. New Inbox Entry Streaming classes:
    • InboxEntryStream - Streamlines the creation and sending of Inbox entries, supporting optional file attachments with parallel file uploads for enhanced performance.

@djenczewski djenczewski linked an issue Dec 11, 2024 that may be closed by this pull request
@djenczewski djenczewski requested a review from filipg43 December 11, 2024 09:34
@djenczewski djenczewski marked this pull request as ready for review December 11, 2024 09:34
@djenczewski djenczewski merged commit ce2807b into dev Dec 11, 2024
@djenczewski djenczewski mentioned this pull request Jan 31, 2025
djenczewski added a commit that referenced this pull request Feb 3, 2025
* chore: GitHub issue templates (#6)

* chore: create issue templates

* chore: update issue templates

* feat: container policies implementation (#7)

* feat: Implementation of container policies #2

* refactor(privmx-endpoint-extra): rename class BasePolicyValue to SpecialPolicyValue #2

* refactor: rename classes ContainerPolicyChainValue and ItemPolicyChainValue to ContainerPolicyComplexValue and ItemPolicyComplexValue (#2)

* docs: Container and Items Policies documentation (#2)

* feat: New ItemPolicyBuilder constructor with itemPolicy parameter to initialized builder from existing ItemPolicy (#2)

* feat: Implement field "policy" in Thread, Store, Inbox models (#2)

* feat: Native initializers for policies model classes (#2)

* docs: policies documentation update

* docs: policies documentation update

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>

* feat: rename platformConnect/platformConnectPublic methods to connect/connectPublic (#8)

* feat: change platformConnect/platformConnectPublic method names to connect/connectPublic
Mark platformConnect/platformConnectPublic methods as deprecated

* docs: connection update

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>

* feat: implement inbox streaming api (#9)

* feat(privmx-endopint-extra): Implement Inbox Stream API #4

* refactor: InboxFileStreamWriter.writeStream method improvements (#4)

* fix: throw NullPointerException when InboxEntryStream.EntryStreamListener.onNextChunkRequest returns null during sending file (#4)

* docs: Create docs for Inbox stream API (#4)

* docs: Update docs for InboxEntryStream (#4)

* docs: update inbox streaming api

* refactor: readed -> read

* docs: Update onStartFileSending method docs (#4)

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>

* perf(privmx-endpoint-extra): improve performance of EventDispatcher.channelHasNoCallbacks method (#12)

* fix(privmx-endpoint): parsing policies from Java to C++ when policy is null (#13)

* docs: exceptions for Inbox methods (#14)

* docs(privmx-endpoint): add information about exceptions in documentation for InboxApi methods

* docs(privmx-endpoint): add documentation for close method in InboxApi.java

* docs(privmx-endpoint-extra): add information about exceptions for InboxEntryStream and InboxFileStreamWriter

* docs: InboxEntryStream exceptions update

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>

* refactor: cleanup code (#15)

* refactor: Formatting code, suppress warnings, remove typos (#10)

* refactor: remove unused code (#10)

* refactor: Remove duplicated implementation of close method in PrivmxEndpoint.java (#10)

* refactor: replace Map entry to compatible with Java 8 implementation (#10)

* refactor: Make predefined event types as final (#10)

* refactor: make InboxEntryStream.FileInfo fields as final (#10)

* refactor: remove unused code from parser and PrivmxEndpoint.java

* refactor: remove unchecked suppressWarning from EventDispatcher.java

* fix: errors from JNI while creating or updating Inbox with policies

* fix: NoSuchFieldError "_delete" error during creating or updating Thread/Store/Inbox with policies

* fix: GetStringUTFChars error during creating or updating Thread/Store/Inbox with policies parameter

* fix: make policy builders methods public

* docs: add documentation tags (category and group) to ItemPolicy, ContainerPolicy and ContainerPolicyWithoutItem classes. (#18)

* docs: add documentation for static fields in SpecialPolicyValue class

* fix: restore constructors without policies parameter (#20)

* fix: restore constructors without policies

* docs: modify description for constructors Thread, Store and Inbox classes

---------

Co-authored-by: Dawid Jenczewski <djenczewski@simplito.com>

* fix: change parameter forceGenerateNewKey default value.

* fix: change parameter types in ItemPolicyBuilder's methods #23

* feat: Add `inherit` value in ItemPolicyValues class

* fix: Make InboxEntryStream.onError method synchronized and no call cancel() method

* docs: update fileHandle parameter description in InboxApi.writeToFile method

* fix: parsing the FilesConfig within JNI wrapper during Inbox creation or update

* docs: update description for InboxEntryStream.EntryStreamListener.onNextChunkRequest method

* docs: rename `filesConfig` parameter to `fileInfos` in InboxEntryStream.prepareEntry methods

---------

Co-authored-by: fgrochowski <fgrochowski@simplito.com>
Co-authored-by: Doominika <dsluzynska@simplito.com>
Co-authored-by: Doominika <101605588+Doominika@users.noreply.github.com>
@djenczewski djenczewski deleted the feat/implement-inbox-streaming-api branch February 3, 2025 15:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Implement Inbox Streaming API
2 participants