We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to stream response from server to client:
interface WizerImportService { @AstrixStreamed Observable<TransactionRecord> getTransactions(); } // Service implementation class WizerServer implements WizerImportService { @Override public Observable<TransactionRecord> getTransactions() { return Observable.create(new OnSubscribe<TransactionRecord>() { @Override public void call(Subscriber<? super TransactionRecord> t1) { try { for (TransactionRecord record : streamRecordsFromDisk()) { t1.onNext(record); } t1.onCompleted(); } catch (Exception e) { t1.onError(e); } } }); } } // Example consumption pattern class WizerClient { WizerImportService wizerImport; public void runWizerImpor() { wizerImport.getTransactions().doOnNext(processTransaction()); } private Action1<? super TransactionRecord> processTransaction() { return new Action1<TransactionRecord>() { @Override public void call(TransactionRecord t1) { // process t1 } }; } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add support to stream response from server to client:
The text was updated successfully, but these errors were encountered: