|
@@ -1,13 +1,26 @@
|
|
|
import { AcknowledgementService } from "../services/acknowledgement.service";
|
|
|
import { StreamingService } from "./test-streamOBS";
|
|
|
-import { SyncrhonizationService } from "../services/synchronization.service";
|
|
|
-import { LogSetting } from "../dependencies/fisloggingservice/type/datatype";
|
|
|
+import { MessageSyncrhonizationService } from "../services/synchronization.service";
|
|
|
+import { IncomingMessageService } from "../services/incomingMessage.service";
|
|
|
+import { map, Observable } from "rxjs";
|
|
|
+import { LogSetting, MessageLog } from "../dependencies/fisloggingservice/type/datatype";
|
|
|
+import { BaseMessage } from "../dependencies/fisappmessagejsutilty/dependencies/dependencies";
|
|
|
const acknowledge = new AcknowledgementService()
|
|
|
-const syncrhonize = new SyncrhonizationService()
|
|
|
+const incoming = new IncomingMessageService()
|
|
|
+const syncrhonize = new MessageSyncrhonizationService()
|
|
|
const streamService = new StreamingService()
|
|
|
|
|
|
+/* -------------- TEST -------------------- */
|
|
|
+// change payload into Observable<BaseMessage>
|
|
|
+const payload: Observable<BaseMessage> = streamService.stream().pipe(
|
|
|
+ map(dataSet => ({
|
|
|
+ header: dataSet.appLogLocId,
|
|
|
+ data: dataSet
|
|
|
+ }))
|
|
|
+);
|
|
|
+
|
|
|
// Configure Log Setting
|
|
|
-const storage: LogSetting = {
|
|
|
+let storage: LogSetting = {
|
|
|
storage: "File",
|
|
|
setting: {
|
|
|
appName: 'Default from client',
|
|
@@ -15,13 +28,15 @@ const storage: LogSetting = {
|
|
|
logLocName: 'To be generated in client',
|
|
|
}
|
|
|
}
|
|
|
+let dataSet: LogSetting & { incomingObservable: Observable<BaseMessage> } = {
|
|
|
+ storage: storage.storage,
|
|
|
+ setting: storage.setting,
|
|
|
+ customSetting: storage.customSetting,
|
|
|
+ incomingObservable: payload
|
|
|
+}
|
|
|
|
|
|
-// console.log(`I am Client 1`)
|
|
|
-// syncrhonize.synchronize()
|
|
|
-
|
|
|
-/* -------------- ACTION -------------------- */
|
|
|
-const payload = streamService.stream()
|
|
|
+incoming.init(dataSet)
|
|
|
|
|
|
-acknowledge.init(storage).then(() => {
|
|
|
- acknowledge.subscribe(payload)
|
|
|
-}).catch((e) => console.error(e))
|
|
|
+// acknowledge.init(storage).then(() => {
|
|
|
+// acknowledge.subscribe(payload)
|
|
|
+// }).catch((e) => console.error(e))
|