@Override public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException { Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = false; try { delegate = findDelegateForNewObject(name); if (delegate.shouldAuthorize()) { authorizeSensitiveOperation(CREATE_MBEAN, readOnly, true); } return delegate.createMBean(className, name); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof InstanceAlreadyExistsException) throw (InstanceAlreadyExistsException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof NotCompliantMBeanException) throw (NotCompliantMBeanException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).createMBean(className, name); } } }
@Override public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException { Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = false; try { delegate = findDelegateForNewObject(name); authorizeMBeanOperation(delegate, name, CREATE_MBEAN, null, JmxAction.Impact.WRITE); return checkNotAReservedDomainRegistrationIfObjectNameWasChanged(name, delegate.createMBean(className, name), delegate); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof InstanceAlreadyExistsException) throw (InstanceAlreadyExistsException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof NotCompliantMBeanException) throw (NotCompliantMBeanException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).createMBean(className, name); } } }
@Override public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException { Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = false; try { delegate = findDelegateForNewObject(name); authorizeMBeanOperation(delegate, name, CREATE_MBEAN, null, JmxAction.Impact.WRITE); return checkNotAReservedDomainRegistrationIfObjectNameWasChanged(name, delegate.createMBean(className, name, loaderName), delegate); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof InstanceAlreadyExistsException) throw (InstanceAlreadyExistsException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof NotCompliantMBeanException) throw (NotCompliantMBeanException)e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).createMBean(className, name, loaderName); } } }
@Override public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException { Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = false; try { delegate = findDelegateForNewObject(name); if (delegate.shouldAuthorize()) { authorizeSensitiveOperation(CREATE_MBEAN, readOnly, true); } return delegate.createMBean(className, name, loaderName); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof InstanceAlreadyExistsException) throw (InstanceAlreadyExistsException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof NotCompliantMBeanException) throw (NotCompliantMBeanException)e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).createMBean(className, name, loaderName); } } }
@Override public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException { params = nullAsEmpty(params); signature = nullAsEmpty(signature); Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = false; try { delegate = findDelegateForNewObject(name); authorizeMBeanOperation(delegate, name, CREATE_MBEAN, null, JmxAction.Impact.WRITE); return checkNotAReservedDomainRegistrationIfObjectNameWasChanged(name, delegate.createMBean(className, name, loaderName, params, signature), delegate); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof InstanceAlreadyExistsException) throw (InstanceAlreadyExistsException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof NotCompliantMBeanException) throw (NotCompliantMBeanException)e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).createMBean(className, name, params, signature); } } }
@Override public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException { params = nullAsEmpty(params); signature = nullAsEmpty(signature); Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = false; try { delegate = findDelegateForNewObject(name); if (delegate.shouldAuthorize()) { authorizeSensitiveOperation(CREATE_MBEAN, readOnly, true); } return delegate.createMBean(className, name, params, signature); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof InstanceAlreadyExistsException) throw (InstanceAlreadyExistsException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof NotCompliantMBeanException) throw (NotCompliantMBeanException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).createMBean(className, name, params, signature); } } }
@Override public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException { params = nullAsEmpty(params); signature = nullAsEmpty(signature); Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = false; try { delegate = findDelegateForNewObject(name); authorizeMBeanOperation(delegate, name, CREATE_MBEAN, null, JmxAction.Impact.WRITE); return checkNotAReservedDomainRegistrationIfObjectNameWasChanged(name, delegate.createMBean(className, name, params, signature), delegate); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof InstanceAlreadyExistsException) throw (InstanceAlreadyExistsException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof NotCompliantMBeanException) throw (NotCompliantMBeanException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).createMBean(className, name, params, signature); } } }
@Override public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException { params = nullAsEmpty(params); signature = nullAsEmpty(signature); Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = false; try { delegate = findDelegateForNewObject(name); if (delegate.shouldAuthorize()) { authorizeSensitiveOperation(CREATE_MBEAN, readOnly, true); } return delegate.createMBean(className, name, loaderName, params, signature); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof InstanceAlreadyExistsException) throw (InstanceAlreadyExistsException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof NotCompliantMBeanException) throw (NotCompliantMBeanException)e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).createMBean(className, name, params, signature); } } }