test1a.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { AcknowledgementService } from "../services/acknowledgement.service";
  2. import { StreamingService } from "./test-streamOBS";
  3. import { MessageAuditorService } from "../services/message-auditor.service";
  4. import { IncomingMessageService } from "../services/incomingMessage.service";
  5. import { map, Observable } from "rxjs";
  6. import { LogSetting, MessageLog } from "../dependencies/fisloggingservice/type/datatype";
  7. import { BaseMessage } from "../dependencies/fisappmessagejsutilty/dependencies/dependencies";
  8. const incoming = new IncomingMessageService()
  9. const acknowledge = new AcknowledgementService()
  10. const syncrhonize = new MessageAuditorService()
  11. const streamService = new StreamingService()
  12. /* -------------- TEST -------------------- */
  13. // change payload into Observable<BaseMessage>
  14. const payload: Observable<BaseMessage> = streamService.stream();
  15. // Configure Log Setting
  16. let storage: LogSetting = {
  17. storage: "File",
  18. setting: {
  19. appName: 'Default from client',
  20. appLocName: 'To be generated in client',
  21. logLocName: 'To be generated in client',
  22. }
  23. }
  24. let dataSet: LogSetting & { incomingObservable: Observable<BaseMessage> } = {
  25. storage: storage.storage,
  26. setting: storage.setting,
  27. customSetting: storage.customSetting,
  28. incomingObservable: payload
  29. }
  30. incoming.init(dataSet)
  31. // acknowledge.init(storage).then(() => {
  32. // acknowledge.subscribe(dataSet.incomingObservable)
  33. // })