1 /**
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * If it is not possible or desirable to put the notice in a particular
7 * file, then You may include the notice in a location (such as a LICENSE
8 * file in a relevant directory) where a recipient would be likely to look
9 * for such a notice.
10
11 *
12 */
13
14 /* ---------------------------------------------------------------------------
15 * U.S. Government, Department of the Army
16 * Army Materiel Command
17 * Research Development Engineering Command
18 * Communications Electronics Research Development and Engineering Center
19 * ---------------------------------------------------------------------------
20 */
21 package org.miloss.fgsms.sla;
22
23 /**
24 * This is a managed bean adapter instance for the singleton SLA
25 * Processor Only needed when jboss thread pools are not available
26 *
27 * @author AO
28 */
29 public class SLAProcessorController implements SLAProcessorControllerMBean {
30
31 @Override
32 public void Start() {
33 SLAProcessorSingleton instance = SLAProcessorSingleton.getInstance();
34 SLAProcessorSingleton.setRunning(true);
35 SLAProcessorSingleton.run();
36 }
37
38 @Override
39 public void Stop() {
40 SLAProcessorSingleton instance = SLAProcessorSingleton.getInstance();
41 SLAProcessorSingleton.setRunning(false);
42 }
43
44 @Override
45 public int SizeOfQueue() {
46 SLAProcessorSingleton instance = SLAProcessorSingleton.getInstance();
47 return SLAProcessorSingleton.GetQueueSize();
48 }
49 }