/** * Leave the CCOW common context. */ public void ccowLeave() { if (ccowContextManager != null && ccowContextManager.getState() != CCOWState.csSuspended) { ccowContextManager.suspend(); } }
/** * Leave the CCOW common context. */ public void ccowLeave() { if (ccowContextManager != null && ccowContextManager.getState() != CCOWState.csSuspended) { ccowContextManager.suspend(); } }
/** * Enables or disables CCOW support. * * @param ccowEnabled True enables CCOW support if it is available. */ public void setCCOWEnabled(boolean ccowEnabled) { this.ccowEnabled = ccowEnabled; if (!ccowEnabled && ccowContextManager != null) { ccowContextManager.suspend(); ccowContextManager = null; } updateCCOWStatus(); }
/** * Enables or disables CCOW support. * * @param ccowEnabled True enables CCOW support if it is available. */ public void setCCOWEnabled(boolean ccowEnabled) { this.ccowEnabled = ccowEnabled; if (!ccowEnabled && ccowContextManager != null) { ccowContextManager.suspend(); ccowContextManager = null; } updateCCOWStatus(); }
/** * Joins the CCOW common context, if available. */ public void ccowJoin() { if (ccowIsActive()) { return; } if (ccowContextManager == null && ccowEnabled) { ccowContextManager = new CCOWContextManager(); ccowContextManager.subscribe(this); ccowContextManager.run("CareWebFramework#", "", true, "*"); } if (ccowContextManager != null) { if (!ccowContextManager.isActive()) { ccowContextManager.resume(); } init(response -> { if (response.rejected()) { ccowContextManager.suspend(); } updateCCOWStatus(); }); } }
/** * Joins the CCOW common context, if available. * * @return True if the operation was successful. */ public boolean ccowJoin() { if (ccowIsActive()) { return true; } if (ccowContextManager == null && ccowEnabled) { ccowContextManager = new CCOWContextManager(); ccowContextManager.subscribe(this); ccowContextManager.run("CareWebFramework#", "", true, "*"); } if (ccowContextManager != null) { if (!ccowContextManager.isActive()) { ccowContextManager.resume(); } if (!init()) { ccowContextManager.suspend(); } } updateCCOWStatus(); return ccowIsActive(); }