1 /** 2 * Sequoia: Database clustering technology. 3 * Copyright (C) 2005 Emic Networks. 4 * Contact: sequoia@continuent.org 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 * Initial developer(s): Jeff Mesnil. 19 * Contributor(s): ______________________. 20 */ 21 22 package org.continuent.sequoia.controller.loadbalancer; 23 24 import javax.management.NotCompliantMBeanException; 25 26 import org.continuent.sequoia.common.jmx.mbeans.BackendTaskQueuesControlMBean; 27 import org.continuent.sequoia.controller.jmx.AbstractStandardMBean; 28 29 /** 30 * BackendTaskQueuesControlMBean implementation. 31 */ 32 public class BackendTaskQueuesControl extends AbstractStandardMBean 33 implements 34 BackendTaskQueuesControlMBean 35 { 36 37 private BackendTaskQueues managedTaskQueues; 38 39 /** 40 * Creates a new <code>BackendTaskQueuesControl</code> object 41 * 42 * @param taskQueues the managed BackendTaskQueues 43 * @throws NotCompliantMBeanException if the mbean is not compliant 44 */ 45 public BackendTaskQueuesControl(BackendTaskQueues taskQueues) 46 throws NotCompliantMBeanException 47 { 48 super(BackendTaskQueuesControlMBean.class); 49 this.managedTaskQueues = taskQueues; 50 } 51 52 /** 53 * @see org.continuent.sequoia.controller.jmx.AbstractStandardMBean#getAssociatedString() 54 */ 55 public String getAssociatedString() 56 { 57 return "backend task queues"; 58 } 59 60 /** 61 * @see org.continuent.sequoia.common.jmx.mbeans.BackendTaskQueuesControlMBean#dump() 62 */ 63 public String dump() 64 { 65 return managedTaskQueues.dump(); 66 } 67 } 68