org.miloss.fgsms.sla.SLAProcessorController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fgsms-sla-processor Show documentation
Show all versions of fgsms-sla-processor Show documentation
The SLA processor handles rules and actions invocations based on service owner defined rules
The newest version!
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
/**
* This is a managed bean adapter instance for the singleton SLA
* Processor Only needed when jboss thread pools are not available
*
* @author AO
*/
public class SLAProcessorController implements SLAProcessorControllerMBean {
@Override
public void Start() {
SLAProcessorSingleton instance = SLAProcessorSingleton.getInstance();
SLAProcessorSingleton.setRunning(true);
SLAProcessorSingleton.run();
}
@Override
public void Stop() {
SLAProcessorSingleton instance = SLAProcessorSingleton.getInstance();
SLAProcessorSingleton.setRunning(false);
}
@Override
public int SizeOfQueue() {
SLAProcessorSingleton instance = SLAProcessorSingleton.getInstance();
return SLAProcessorSingleton.GetQueueSize();
}
}