2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.config.util;
10 import javax.management.Attribute;
11 import javax.management.InstanceNotFoundException;
12 import javax.management.ObjectName;
13 import org.opendaylight.controller.config.api.ConflictingVersionException;
14 import org.opendaylight.controller.config.api.ValidationException;
15 import org.opendaylight.controller.config.api.jmx.CommitStatus;
16 import org.opendaylight.controller.config.api.jmx.ConfigTransactionControllerMXBean;
18 public interface ConfigTransactionClient extends
19 ConfigTransactionControllerMXBean {
21 CommitStatus commit() throws ConflictingVersionException,
24 void assertVersion(int expectedParentVersion, int expectedCurrentVersion);
26 long getParentVersion();
30 ObjectName getObjectName();
32 void validateBean(ObjectName configBeanON) throws ValidationException;
36 * Use {@link #destroyModule(String, String)}
38 void destroyConfigBean(String moduleName, String instanceName) throws InstanceNotFoundException;
40 void destroyModule(String moduleName, String instanceName) throws InstanceNotFoundException;
42 void setAttribute(ObjectName on, String jmxName, Attribute attribute);
45 * Get the attribute named jmxName from the Object with ObjectName on
47 * @param on - ObjectName of the Object from which the attribute should be read
48 * @param jmxName - name of the attribute to be read
50 * @return Attribute of Object on with attribute name jmxName
52 Attribute getAttribute(ObjectName on, String jmxName);