From d87e491edd2cadb92a20cd720427b92bcd8135c4 Mon Sep 17 00:00:00 2001 From: Robert Koifman Date: Sat, 21 Oct 2023 13:26:59 +0500 Subject: [PATCH] text update --- docs/pub-sub-events/raising-private-events.md | 6 ++---- docs/pub-sub-events/raising-queueing-events.md | 6 ++---- docs/pub-sub-events/raising-replacing-events.md | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/pub-sub-events/raising-private-events.md b/docs/pub-sub-events/raising-private-events.md index 5efdd29..1eee567 100644 --- a/docs/pub-sub-events/raising-private-events.md +++ b/docs/pub-sub-events/raising-private-events.md @@ -31,17 +31,15 @@ public class PrivateEvent { public final String name; public final long clientId; public final SequenceEncoder arguments; - + public PrivateEvent(String name, long clientId) } ``` Here is a description of the PrivateEvent members: -* uid is the event ID used internally by the platform; * name is the name of the event, provided to the constructor when the class instance is created, and also specified in the event definition in the site structure; * clientId is the client ID taken from the client request earlier; * arguments is a field of type SequenceEncoder provided by Softnet ASN.1 Codec. The data size in arguments is limited to 2 kilobytes; -* getEncoding is a method that returns an ASN.1 DER encoding of data provided to arguments. -* PrivateEvent is a constructor that takes the event name and the client ID; +* PrivateEvent is a constructor that takes the event name and the client ID. Finally, we'll look at an example of defining and raising a Private event. Let's say we have a Softnet service "WaterTempController" that controls the temperature of the water in a boiler. We also have a Java class with the same name that implements the service. The service allows you to remotely set the water temperature. To do this, it implements an RPC procedure that accepts the target temperature. Since the temperature cannot be set immediately, the procedure starts the requested process, writes the current temperature to the result parameter and completes. When the target temperature is set, the controller raises a Private event to notify the client. diff --git a/docs/pub-sub-events/raising-queueing-events.md b/docs/pub-sub-events/raising-queueing-events.md index 2f2593b..e2399ed 100644 --- a/docs/pub-sub-events/raising-queueing-events.md +++ b/docs/pub-sub-events/raising-queueing-events.md @@ -28,16 +28,14 @@ The parameter is of type QueueingEvent with the fo public class QueueingEvent { public final String name; public final SequenceEncoder arguments; - + public QueueingEvent(String name) } ``` Here is a description of the QueueingEvent members: -* uid is the event ID used internally by the platform. However, if you want to provide it to subscribed clients, you can add it to the arguments field of the class; * name is the name of the event, provided to the constructor when the class instance is created, and also specified in the event definition in the site structure; * arguments is a field of type SequenceEncoder provided by Softnet ASN.1 Codec. Accordingly, on the client side, events have an arguments field of type SequenceDecoder. The data size in arguments is limited to 2 kilobytes; -* getEncoding is a method that returns an ASN.1 DER encoding of data provided to arguments. -* QueueingEvent is a constructor that takes the name of the event; +* QueueingEvent is a constructor that takes the name of the event. This section concludes with an example of defining and raising a Queueing event. 1. The following code defines "CriticalWaterTemperature" as a Queueing event using the second overload of the addQueueingEvent method. It specifies the lifetime as 10 hours, the maximum queue size as 50, and the access rule denies guest clients: diff --git a/docs/pub-sub-events/raising-replacing-events.md b/docs/pub-sub-events/raising-replacing-events.md index d3748ef..a83bcea 100644 --- a/docs/pub-sub-events/raising-replacing-events.md +++ b/docs/pub-sub-events/raising-replacing-events.md @@ -30,7 +30,7 @@ public class ReplacingEvent { public final String name; public final SequenceEncoder arguments; public final boolean isNull; - + public ReplacingEvent(String name) } ``` @@ -43,12 +43,10 @@ public class ReplacingNullEvent extends ReplacingEvent { ``` The next is a description of the ReplacingEvent members: -* uid is the event ID used internally by the platform. However, if you want to provide it to subscribed clients, you can add it to the arguments field of the class; * name is the name of the event, provided to the constructor when the class instance is created, and also specified in the event definition in the site structure; * arguments is a field of type SequenceEncoder provided by Softnet ASN.1 Codec. The service can pass data organized in complex structures through this field to subscribers. Accordingly, on the client side, events have an arguments field of type SequenceDecoder. The data size in arguments is limited to 2 kilobytes. Before raising an event, an application can check the size of data by calling the getSize method of SequenceEncoder; * isNull indicates if the event is null-event. It is always false for ReplacingEvent instances and true for ReplacingNullEvent instances; -* ReplacingEvent is a constructor that takes the name of the event; -* getEncoding is a method that returns the ASN.1 DER encoding of data provided to arguments. +* ReplacingEvent is a constructor that takes the name of the event. To create a null-event, your application calls the ReplacingNullEvent constructor with the name of the Replacing event as an argument. The arguments field of this object is null, that is, the null-event cannot have arguments.