From e5c073787c2dacf6afcba6bb1488b7ae58101ca8 Mon Sep 17 00:00:00 2001 From: WSO2 Builder Date: Thu, 15 Apr 2021 06:26:39 +0000 Subject: [PATCH] [WSO2-Release] [Release 3.0.2] update documentation for release 3.0.2 --- README.md | 10 +- docs/api/3.0.2.md | 345 +++++++++++++++++++++++++++++++++++++++++++++ docs/api/latest.md | 8 +- docs/index.md | 10 +- mkdocs.yml | 1 + 5 files changed, 360 insertions(+), 14 deletions(-) create mode 100644 docs/api/3.0.2.md diff --git a/README.md b/README.md index 8a8d3c6..421bf6e 100644 --- a/README.md +++ b/README.md @@ -19,14 +19,14 @@ For information on Siddhi and i ## Latest API Docs -Latest API Docs is 3.0.1. +Latest API Docs is 3.0.2. ## Features -* websocket *(Sink)*

A Siddhi application can be configured to publish events via the Websocket transport by adding the @Sink(type = 'websocket') annotation at the top of an event stream definition.

-* websocket-server *(Sink)*

A Siddhi application can be configured to publish events via the WebSocket transport by adding the @Sink(type = 'websocket-server') annotation at the top of an event stream definition.

-* websocket *(Source)*

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket') annotation at the top of an event stream definition.
When this is defined the associated stream will receive events from the WebSocket server on the url defined in the system.

-* websocket-server *(Source)*

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket-server') annotation at the top of an event stream definition.

+* websocket *(Sink)*

A Siddhi application can be configured to publish events via the Websocket transport by adding the @Sink(type = 'websocket') annotation at the top of an event stream definition.

+* websocket-server *(Sink)*

A Siddhi application can be configured to run as a websocket server by adding the @Sink(type = 'websocket-server') annotation at the top of an event stream definition.

+* websocket *(Source)*

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket') annotation at the top of an event stream definition.
When this is defined the associated stream will receive events from the WebSocket server on the url defined in the system.

+* websocket-server *(Source)*

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket-server') annotation at the top of an event stream definition.

## Dependencies diff --git a/docs/api/3.0.2.md b/docs/api/3.0.2.md new file mode 100644 index 0000000..b2b9448 --- /dev/null +++ b/docs/api/3.0.2.md @@ -0,0 +1,345 @@ +# API Docs - v3.0.2 + +!!! Info "Tested Siddhi Core version: *5.1.13*" + It could also support other Siddhi Core minor versions. + +## Sink + +### websocket *(Sink)* +

+

A Siddhi application can be configured to publish events via the Websocket transport by adding the @Sink(type = 'websocket') annotation at the top of an event stream definition.

+

+Syntax + +``` +@sink(type="websocket", url="", sub.protocol="", headers="", idle.timeout="", truststore.path="", truststore.password="", @map(...))) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
url

The URL of the remote endpoint.
The url scheme should be either 'ws' or 'wss'.

STRINGNoNo
sub.protocol

The negotiable sub-protocol if server is asking for it.
The sub.protocol should adhere to subprotocol1, subprotocol2,... format.

nullSTRINGYesNo
headers

Any specific headers which need to send to the server.
The headers should adhere to 'key1:value1', 'key2:value2',... format.

nullSTRINGYesNo
idle.timeout

Idle timeout of the connection

-1INTYesNo
truststore.path

The file path to the location of the truststore. If a custom truststore is not specified, then the system uses the default truststore file - wso2carbon.jks in the ${carbon.home}/resources/security directory.

${carbon.home}/resources/security/client-truststore.jksSTRINGYesNo
truststore.password

The password for the truststore. A custom password can be specified if required. If no custom password is specified, then the system uses wso2carbon as the default password.

wso2carbonSTRINGYesNo
+ +Examples +EXAMPLE 1 +``` +@Sink(type = 'websocket', url = 'ws://localhost:8025/abc', + @map(type='xml')) +define stream Foo (attribute1 string, attribute2 int); +``` +

+

A sink of type 'websocket' has been defined.
All events arriving at Foo stream will be sent to the url ws://localhost:8025/abc where the websocket server resides.

+

+### websocket-server *(Sink)* +

+

A Siddhi application can be configured to run as a websocket server by adding the @Sink(type = 'websocket-server') annotation at the top of an event stream definition.

+

+Syntax + +``` +@sink(type="websocket-server", host="", port="", sub.protocol="", idle.timeout="", tls.enabled="", keystore.path="", keystore.password="", @map(...))) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
host

host of the WebSocket server

STRINGNoNo
port

port of the WebSocket server

STRINGNoNo
sub.protocol

Sub-Protocols which are allowed by the service.
The sub.protocol should adhere to subprotocol1, subprotocol2,... format.

nullSTRINGYesNo
idle.timeout

Idle timeout of the connection. If the idle.timeout = '-1' then the timer is disabled.

-1INTYesNo
tls.enabled

This parameter specifies whether a secure connection is enabled or not. When this parameter is set to true, the keystore.path and the keystore.password parameters are initialized.

falseBOOLYesNo
keystore.path

The file path to the location of the keystore. If a custom keystore is not specified, then the system uses the default keystore file - wso2carbon.jks in the ${carbon.home}/resources/security directory.

${carbon.home}/resources/security/wso2carbon.jksSTRINGYesNo
keystore.password

The password for the keystore. A custom password can be specified if required. If no custom password is specified, then the system uses wso2carbon as the default password.

wso2carbonSTRINGYesNo
+ +Examples +EXAMPLE 1 +``` +@Sink(type = 'websocket-server', host='localhost', port='9025', + @map(type='xml')) +define stream Foo (attribute1 string, attribute2 int); +``` +

+

A sink of type 'websocket-server' has been defined.
Clients can connect to ws://localhost:9025/abc. All events arriving at Foo stream will be sent to all the clients who got connected.

+

+## Source + +### websocket *(Source)* +

+

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket') annotation at the top of an event stream definition.
When this is defined the associated stream will receive events from the WebSocket server on the url defined in the system.

+

+Syntax + +``` +@source(type="websocket", url="", sub.protocol="", headers="", idle.timeout="", truststore.path="", truststore.password="", @map(...))) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
url

The URL of the remote endpoint.
The url scheme should be either 'ws' or 'wss'.

STRINGNoNo
sub.protocol

The negotiable sub-protocol if server is asking for it.
The sub.protocol should adhere to subprotocol1, subprotocol2,... format.

nullSTRINGYesNo
headers

Any specific headers which need to send to the server.
The headers should adhere to 'key1:value1', 'key2:value2',... format.

nullSTRINGYesNo
idle.timeout

Idle timeout of the connection

-1INTYesNo
truststore.path

The file path to the location of the truststore. If a custom truststore is not specified, then the system uses the default truststore file - wso2carbon.jks in the ${carbon.home}/resources/security directory.

${carbon.home}/resources/security/client-truststore.jksSTRINGYesNo
truststore.password

The password for the truststore. A custom password can be specified if required. If no custom password is specified, then the system uses wso2carbon as the default password.

wso2carbonSTRINGYesNo
+ +Examples +EXAMPLE 1 +``` +@Source(type = 'websocket', url = 'ws://localhost:8025/websockets/abc', + @map(type='xml')) +define stream Foo (attribute1 string, attribute2 int); +``` +

+

Under this configuration, events are received via the WebSocket server and they are passed to Foo stream for processing.

+

+### websocket-server *(Source)* +

+

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket-server') annotation at the top of an event stream definition.

+

+Syntax + +``` +@source(type="websocket-server", host="", port="", sub.protocol="", idle.timeout="", tls.enabled="", keystore.path="", keystore.password="", @map(...))) +``` + +QUERY PARAMETERS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
host

host of the WebSocket server

STRINGNoNo
port

port of the WebSocket server

STRINGNoNo
sub.protocol

Sub-Protocols which are allowed by the service.
The sub.protocol should adhere to subprotocol1, subprotocol2,... format.

nullSTRINGYesNo
idle.timeout

Idle timeout of the connection. If the idle.timeout = '-1' then the timer is disabled.

-1INTYesNo
tls.enabled

This parameter specifies whether a secure connection is enabled or not. When this parameter is set to true, the keystore.path and the keystore.password parameters are initialized.

falseBOOLYesNo
keystore.path

The file path to the location of the keystore. If a custom keystore is not specified, then the system uses the default keystore file - wso2carbon.jks in the ${carbon.home}/resources/security directory.

${carbon.home}/resources/security/wso2carbon.jksSTRINGYesNo
keystore.password

The password for the keystore. A custom password can be specified if required. If no custom password is specified, then the system uses wso2carbon as the default password.

wso2carbonSTRINGYesNo
+ +Examples +EXAMPLE 1 +``` +@Source(type = 'websocket-server', host='localhost', port='8025', + @map(type='xml')) +define stream Foo (attribute1 string, attribute2 int); +``` +

+

Under this configuration, events are received via the WebSocket server and they are passed to Foo stream for processing.

+

diff --git a/docs/api/latest.md b/docs/api/latest.md index 04be7ac..b2b9448 100644 --- a/docs/api/latest.md +++ b/docs/api/latest.md @@ -1,4 +1,4 @@ -# API Docs - v3.0.1 +# API Docs - v3.0.2 !!! Info "Tested Siddhi Core version: *5.1.13*" It could also support other Siddhi Core minor versions. @@ -83,11 +83,11 @@ define stream Foo (attribute1 string, attribute2 int); ```

-

A sink of type 'websocket' has been defined.
All events arriving at Foo stream via websocket will be sent to the url ws://localhost:8025/abc.

+

A sink of type 'websocket' has been defined.
All events arriving at Foo stream will be sent to the url ws://localhost:8025/abc where the websocket server resides.

### websocket-server *(Sink)*

-

A Siddhi application can be configured to publish events via the WebSocket transport by adding the @Sink(type = 'websocket-server') annotation at the top of an event stream definition.

+

A Siddhi application can be configured to run as a websocket server by adding the @Sink(type = 'websocket-server') annotation at the top of an event stream definition.

Syntax @@ -171,7 +171,7 @@ define stream Foo (attribute1 string, attribute2 int); define stream Foo (attribute1 string, attribute2 int); ```

-

A sink of type 'websocket-server' has been defined.
All events arriving at Foo stream via websocket-server will be sent to the url ws://localhost:9025/abc.

+

A sink of type 'websocket-server' has been defined.
Clients can connect to ws://localhost:9025/abc. All events arriving at Foo stream will be sent to all the clients who got connected.

## Source diff --git a/docs/index.md b/docs/index.md index 8a8d3c6..421bf6e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -19,14 +19,14 @@ For information on Siddhi and i ## Latest API Docs -Latest API Docs is 3.0.1. +Latest API Docs is 3.0.2. ## Features -* websocket *(Sink)*

A Siddhi application can be configured to publish events via the Websocket transport by adding the @Sink(type = 'websocket') annotation at the top of an event stream definition.

-* websocket-server *(Sink)*

A Siddhi application can be configured to publish events via the WebSocket transport by adding the @Sink(type = 'websocket-server') annotation at the top of an event stream definition.

-* websocket *(Source)*

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket') annotation at the top of an event stream definition.
When this is defined the associated stream will receive events from the WebSocket server on the url defined in the system.

-* websocket-server *(Source)*

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket-server') annotation at the top of an event stream definition.

+* websocket *(Sink)*

A Siddhi application can be configured to publish events via the Websocket transport by adding the @Sink(type = 'websocket') annotation at the top of an event stream definition.

+* websocket-server *(Sink)*

A Siddhi application can be configured to run as a websocket server by adding the @Sink(type = 'websocket-server') annotation at the top of an event stream definition.

+* websocket *(Source)*

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket') annotation at the top of an event stream definition.
When this is defined the associated stream will receive events from the WebSocket server on the url defined in the system.

+* websocket-server *(Source)*

A Siddhi application can be configured to receive events via the WebSocket by adding the @Source(type = 'websocket-server') annotation at the top of an event stream definition.

## Dependencies diff --git a/mkdocs.yml b/mkdocs.yml index 3be0e9a..98497a2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,6 +34,7 @@ pages: - Information: index.md - API Docs: - latest: api/latest.md + - 3.0.2: api/3.0.2.md - 3.0.1: api/3.0.1.md - 3.0.0: api/3.0.0.md - 2.0.0: api/2.0.0.md