X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Fimpl%2Fdynamicmbean%2FDynamicReadableWrapper.java;h=f768731e51b0afc6fc14dca19973d1cca2b78f35;hb=2b78ca93f44c372fd72927db6cbd65f5d8387b49;hp=3a24940a4c058ba91155dcd15ca42e3a86443b4c;hpb=9fb64948564e252018f9b1e13e7cea2c92f991aa;p=controller.git diff --git a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/DynamicReadableWrapper.java b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/DynamicReadableWrapper.java index 3a24940a4c..f768731e51 100644 --- a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/DynamicReadableWrapper.java +++ b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/DynamicReadableWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -14,7 +14,6 @@ import javax.management.InvalidAttributeValueException; import javax.management.MBeanException; import javax.management.MBeanServer; import javax.management.ReflectionException; - import org.opendaylight.controller.config.api.DynamicMBeanWithInstance; import org.opendaylight.controller.config.api.ModuleIdentifier; import org.opendaylight.controller.config.api.jmx.ObjectNameUtil; @@ -28,15 +27,9 @@ public class DynamicReadableWrapper extends AbstractDynamicWrapper implements DynamicMBeanWithInstance { private final AutoCloseable instance; - /** - * @param module - * @param instance - * for recreating Module. - * - */ - public DynamicReadableWrapper(Module module, AutoCloseable instance, - ModuleIdentifier moduleIdentifier, MBeanServer internalServer, - MBeanServer configMBeanServer) { + public DynamicReadableWrapper(final Module module, final AutoCloseable instance, + final ModuleIdentifier moduleIdentifier, final MBeanServer internalServer, + final MBeanServer configMBeanServer) { super(module, false, moduleIdentifier, ObjectNameUtil .createReadOnlyModuleON(moduleIdentifier), getEmptyOperations(), internalServer, configMBeanServer); @@ -54,7 +47,7 @@ public class DynamicReadableWrapper extends AbstractDynamicWrapper implements } @Override - public Object invoke(String actionName, Object[] params, String[] signature) + public Object invoke(final String actionName, final Object[] params, final String[] signature) throws MBeanException, ReflectionException { if ("getInstance".equals(actionName) && (params == null || params.length == 0) @@ -65,17 +58,17 @@ public class DynamicReadableWrapper extends AbstractDynamicWrapper implements } @Override - public Object getAttribute(String attributeName) + public Object getAttribute(final String attributeName) throws AttributeNotFoundException, MBeanException, ReflectionException { - if (attributeName.equals("getInstance")) { + if ("getInstance".equals(attributeName)) { return getInstance(); } return super.getAttribute(attributeName); } @Override - public void setAttribute(Attribute attribute) + public void setAttribute(final Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException { throw new UnsupportedOperationException( @@ -83,7 +76,7 @@ public class DynamicReadableWrapper extends AbstractDynamicWrapper implements } @Override - public AttributeList setAttributes(AttributeList attributes) { + public AttributeList setAttributes(final AttributeList attributes) { throw new UnsupportedOperationException( "setAttributes is not supported on " + moduleIdentifier); }