public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException { try { return delegate.setAttributes(name, attributes); } catch(IOException e) { throw new RuntimeException(e); } }
AttributeList attributeValues = server.getMBeanServerConnection().setAttributes(objectName, attributes);
AttributeList attributeValues = server.getMBeanServerConnection().setAttributes(objectName, attributes);
public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException, IOException { return server.setAttributes(name, attributes); } public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException, IOException {
public AttributeList setAttributes(AttributeList attrs) { try { return mbsc.setAttributes(objectName, attrs); } catch (RuntimeException e) { throw e; } catch (Exception e) { return new AttributeList(); } }
public AttributeList setAttributes(AttributeList attrs) { try { return mbsc.setAttributes(objectName, attrs); } catch (RuntimeException e) { throw e; } catch (Exception e) { return new AttributeList(); } }
public AttributeList setAttributes(AttributeList attrs) { try { return mbsc.setAttributes(objectName, attrs); } catch (RuntimeException e) { throw e; } catch (Exception e) { return new AttributeList(); } }
@Override public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException, IOException { checkConnection(); return connection.setAttributes(name, attributes); }
@Override public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException, IOException { checkConnection(); return connection.setAttributes(name, attributes); }
public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException { try { return resolve(name).setAttributes(name, attributes); } catch (IOException e) { throw new RuntimeException(e); } }
@Override public AttributeList setAttributes(AttributeList attributes) { try { return connection.setAttributes(bean, attributes); } catch (Exception e) { throwUncheked(e); throw new Error("Unreachable"); } }
/** * Set a multiple attributes at once on the server. */ public void setAttributes(ObjectName name, List<Attribute> attributes) throws Exception { checkClientConnected(); mbeanConn.setAttributes(name, new AttributeList(attributes)); }
@Override public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException, IOException { checkConnection(); return connection.setAttributes(name, attributes); }
public void setAttribute(AttributeList attributeList) { try { Assert.notEmpty(attributeList); connection.setAttributes(objectName, attributeList); } catch(IOException | InstanceNotFoundException | ReflectionException e) { throw new AttributeException(e.getMessage(), e); } }
/** Same as XAttributesAccess.setAttributes, but with exceptions */ public AttributeList setAttributes(final AttributeList requested) throws IOException, InstanceNotFoundException, ReflectionException { final AttributeList results = getMBeanServerConnection().setAttributes(getObjectName(), requested); postSetAttributesHook(requested, results); return (results); }
/** Same as XAttributesAccess.setAttributes, but with exceptions */ public AttributeList setAttributes(final AttributeList requested) throws IOException, InstanceNotFoundException, ReflectionException { final AttributeList results = getMBeanServerConnection().setAttributes(getObjectName(), requested); postSetAttributesHook(requested, results); return (results); }
@Test public void testSetAttributes() throws Exception { UUID uuid = UUID.randomUUID(); mbeanServerConnection.setAttributes(testMBeanName, new AttributeList(ImmutableList.of(new Attribute("Value", "Foo"), new Attribute("ObjectValue", uuid)))); assertEquals(testMBean.getValue(), "Foo"); assertEquals(testMBean.getObjectValue(), uuid); mbeanServerConnection.setAttributes(testMBeanName, new AttributeList(ImmutableList.of(new Attribute("Value", null), new Attribute("ObjectValue", null)))); assertEquals(testMBean.getValue(), null); assertEquals(testMBean.getObjectValue(), null); }
@Test public void testSetAttributes() throws Exception { UUID uuid = UUID.randomUUID(); mbeanServerConnection.setAttributes(testMBeanName, new AttributeList(ImmutableList.of(new Attribute("Value", "Foo"), new Attribute("ObjectValue", uuid)))); assertEquals(testMBean.getValue(), "Foo"); assertEquals(testMBean.getObjectValue(), uuid); mbeanServerConnection.setAttributes(testMBeanName, new AttributeList(ImmutableList.of(new Attribute("Value", null), new Attribute("ObjectValue", null)))); assertEquals(testMBean.getValue(), null); assertEquals(testMBean.getObjectValue(), null); }
@Test public void testSetAttributes() throws Exception { UUID uuid = UUID.randomUUID(); mbeanServerConnection.setAttributes(testMBeanName, new AttributeList(ImmutableList.of(new Attribute("Value", "Foo"), new Attribute("ObjectValue", uuid)))); assertEquals(testMBean.getValue(), "Foo"); assertEquals(testMBean.getObjectValue(), uuid); mbeanServerConnection.setAttributes(testMBeanName, new AttributeList(ImmutableList.of(new Attribute("Value", null), new Attribute("ObjectValue", null)))); assertEquals(testMBean.getValue(), null); assertEquals(testMBean.getObjectValue(), null); }
@Test public void testSetAttributes() throws Exception { UUID uuid = UUID.randomUUID(); mbeanServerConnection.setAttributes(testMBeanName, new AttributeList(ImmutableList.of(new Attribute("Value", "Foo"), new Attribute("ObjectValue", uuid)))); assertEquals(testMBean.getValue(), "Foo"); assertEquals(testMBean.getObjectValue(), uuid); mbeanServerConnection.setAttributes(testMBeanName, new AttributeList(ImmutableList.of(new Attribute("Value", null), new Attribute("ObjectValue", null)))); assertEquals(testMBean.getValue(), null); assertEquals(testMBean.getObjectValue(), null); }