Files
Unify/framework/client/processManager/processManager.js
2025-12-25 11:16:59 +01:00

84 lines
1.4 KiB
JavaScript

/*
Copyright (c) 2020, 2023, The Unified Company.
This code is part of Unify.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE,
as published by the Free Software Foundation.
See the GNU AFFERO GENERAL PUBLIC LICENSE, for more details.
https://unifyjs.org
*/
import processManagerAdd from "./processManager.add.js";
import processManagerUpdate from "./processManager.update.js";
import processManagerPromise from "./processManager.promise.js";
import debugManager from "../debugManager.js";
export default class processManager{
add = new processManagerAdd();
update = new processManagerUpdate();
promise = new processManagerPromise();
debugger = new debugManager();
process( content ) {
var message = JSON.parse( content.data );
switch( message.type ) {
case "promise":
this.promise.process( message );
break;
case "clientUpdate":
this.update.process( message );
break;
case "addObject":
this.add.process( message );
break;
case "debug":
console.log( "debug", message,this.mode );
//if( this.mode == "debug" ) {
this.debugger.processDebugMessage( message );
//}
break;
case "logClient":
console.log( "----------------- Log client", this.application.selector, message );
break;
default:
}
}
}