Skip to content

Commit

Permalink
Introduce response to order messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-weswit committed Jul 20, 2023
1 parent 5dfee29 commit c54ee7b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The similar Data Adapter for the JSON variant is also included.

#### Portfolio Metadata Adapter
A Metadata Adapter to be associated with the Portfolio Demo Data Adapters. This Metadata Adapter inherits from `LiteralBasedProvider` in [Lightstreamer Java In-Process Adapter SDK](https://github.com/Lightstreamer/Lightstreamer-lib-adapter-java-inprocess#literalbasedprovider-metadata-adapter) and just adds a simple support for order entry by implementing the NotifyUserMessage method, to handle "sendMessage" requests from the Portfolio Demo client.
A confirmation response is sent by NotifyUserMessage to the client.
The communication to the Portfolio Feed Simulator is handled here.

It should not be used as a reference for a real case of client-originated message handling, as no guaranteed delivery and no clustering support is shown.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.lightstreamer.examples</groupId>
<artifactId>portfolio-adapter-java</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
<packaging>jar</packaging>

<name>Lightstreamer Portfolio Demo Java Adapter</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public CompletableFuture<String> notifyUserMessage(String user, String session,
String[] pieces = message.split("\\|");
this.loadPortolioFeed();
this.handlePortfolioMessage(pieces,message);
future.complete(null);
future.complete("SUBMITTED");
} catch (CreditsException e) {
future.completeExceptionally(e);
} catch (NotificationException e) {
Expand Down

0 comments on commit c54ee7b

Please sign in to comment.