Skip to content

Cilent send() method definition #206

Discussion options

You must be logged in to vote

Hi @ZhaolinFang,

A Model Server Message basically consists of the message type and the message data. In the websocket use case, this message is typically a string.
Currently, there is only one type of message accepted by the Model Server, which is the keepAlive message.

This message would look like this:

{ "type": "keepAlive", "data": "" }

If you would now try to send this message via the Java Client (which I assume from your description), this could look like this:

JsonNode node = Json.object(
         Json.prop(JsonRequestMember.TYPE, Json.text("keepAlive")),
         Json.prop(JsonRequestMember.DATA, Json.text(""))
);
client.send(modelUri, node.toString());

or simpler:

client.send(mode…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ZhaolinFang
Comment options

@ZhaolinFang
Comment options

@ndoschek
Comment options

@ZhaolinFang
Comment options

Answer selected by ZhaolinFang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants