Skip to content

Commit 34eefb8

Browse files
authored
Merge pull request #61 from reTHINK-project/olddevelop
Olddevelop
2 parents 48f91b5 + 1f3f465 commit 34eefb8

42 files changed

Lines changed: 6436 additions & 2495 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target/
2+
/node_modules/

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ RUN ["mvn", "package"]
4545

4646
#Setup Config
4747
ADD server-keystore.jks /build/server-keystore.jks
48+
ADD configuration.xml /build/configuration.xml
4849

4950
#Run msg-node
5051
EXPOSE 9090

configuration.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Configuration>
3+
</Configuration>

docs/abstract-hyperty.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ Collection of Data Objects handled by the Hyperty:
2424

2525
```
2626
{
27-
<objectURL>: {
28-
userUrl: <URL>,
29-
type: <reporter|observer>
27+
<hypertyUrl>: {
28+
<objectURL>: {
29+
userUrl: <URL>,
30+
type: <reporter|observer>
31+
}
3032
}
3133
}
3234
```

docs/offlineSubscriptionManager/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ Forward of [Subscribe](https://rethink-project.github.io/specs/messages/data-syn
6161

6262
1- It queries the Data Objects Registry collection for the data object URL to be subscribed (`message.body.body.resource`), and replies with 200 OK where `reply.body.value = message.body.body.value`.
6363

64-
2- Queries the registry about cguid status.
64+
2- [Queries the runtime registry](https://github.com/reTHINK-project/dev-java-hyperty/blob/master/docs/registry.md#readstatus-from-user) about cguid status.
6565

6666
3- If online it executes the `processPendingSubscription(subscribeMsg)` otherwise it stores it in the pendingSubscriptions collection.
6767

6868
### status handler
6969

70-
**handler:** <runtime>/status.
70+
**handler:** <runtime-address> + `/registry` e.g. `runtime://sharing-cities-dsm/registry` .
7171

7272
**message:**
7373

docs/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
| Master |
55
| ---------------------------------------- |
6-
| [![Build Status](https://travis-ci.org/reTHINK-project/dev-java-hyperty.svg?branch=master)](https://travis-ci.org/reTHINK-project/dev-java-hyperty) |
6+
| [![Build Status](https://travis-ci.org/reTHINK-project/dev-java-hyperty.svg?branch=master)](https://travis-ci.org/reTHINK-project/dev-java-hyperty) |
77

88

99
## Overview

docs/registry.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This runtime feature is responsible to keep track of the status of users (online / offline) using hyperties executed in the Vertx Runtime, based on status events published by Vertx Runtime Protostub.
44

5+
The registry address is `<runtime-url>\registry` e.g. `runtime://sharing-cities-dsm/registry`
6+
57
### Configuration:
68

79
* `checkStatusTimer`: frequency in seconds to execute checkStatus process.
@@ -22,7 +24,7 @@ The registry handles the registry data collection:
2224
### status handler
2325

2426

25-
**handler:** <runtime-address> + `/status`.
27+
**handler:** <runtime-address> + `/registry` e.g. `runtime://sharing-cities-dsm/registry`.
2628

2729
**message:**
2830

@@ -44,12 +46,11 @@ It updates the registry collection with received info including last modified ti
4446

4547
This function is executed by a timer every `config.checkStatusTimer` seconds.
4648

47-
For each entry in the registry collection where `timeNow - lastModified > config.checkStatusTimer` it updates its status to offline, and publishes its new status (ensure this event is not processed by the registry status handler specifiec above).
49+
For each entry in the registry collection where `timeNow - lastModified > config.checkStatusTimer` it updates its status to offline, and publishes its new status (ensure this event is not processed by the registry status handler specified above).
4850

4951
### readStatus from User
5052

51-
**handler:** <runtime-address> + `/status`.
52-
53+
**handler:** <runtime-address >+ `/registry` e.g. `runtime://sharing-cities-dsm/registry`.
5354
**message to receive request of status:**
5455

5556
```javascript
@@ -78,7 +79,7 @@ body: {
7879
### create status entry
7980

8081

81-
**handler:** <runtime-address> + `/status`.
82+
**handler:** <runtime-address> + `/registry` e.g. `runtime://sharing-cities-dsm/registry`.
8283

8384
**message:**
8485

docs/wallet-manager/readme.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The Wallet Manager hyperty handles Token Wallets on behalf of a user.
1414
```
1515
* `rankingTimer`: num of milliseconds before recalculating user rankings
1616

17+
* `onReadMaxTransactions`: max of transactions to be returned on wallet read request
1718

1819
For each public wallet, a new device and a new sensor is created at the Smart IoT Stub as specified [here](../smart-iot-protostub)
1920

@@ -110,7 +111,7 @@ type: create,
110111
body: { resource: 'wallet/<wallet-address>', value: <transaction JSON Object>}
111112
```
112113

113-
If valid, the transaction is stored and the balance updated.
114+
If valid, the transaction is stored and the balance, bonus credit as well as associated Account are updated.
114115

115116
The transaction is published in the event bus sending a [Wallet update message](https://rethink-project.github.io/specs/messages/wallet-messages/).
116117

@@ -126,7 +127,7 @@ If a `wallet2bGranted` exists, a new transfer is performed to it.
126127
type: read,
127128
```
128129

129-
Returns the stored Wallet value.
130+
Returns the stored Wallet JSON. Number of transactions returned per request is limited to `onReadMaxTransactions`.
130131

131132
### Wallet delete requests
132133

0 commit comments

Comments
 (0)