@Override @Deprecated public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException, ReflectionException { Throwable error = null; MBeanServerPlugin delegate = rootMBeanServer; final boolean readOnly = true; try { if (delegate.shouldAuthorize()) { //Special authorization authorizeSuperUserOrAdministrator(DESERIALIZE); } return delegate.deserialize(className, data); } catch (Exception e) { error = e; if (e instanceof OperationsException) throw (OperationsException)e; if (e instanceof ReflectionException) throw (ReflectionException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).deserialize(className, data); } } }
@Override @Deprecated public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data) throws OperationsException, ReflectionException { Throwable error = null; MBeanServerPlugin delegate = rootMBeanServer; final boolean readOnly = true; try { if (delegate.shouldAuthorize()) { //Special authorization authorizeSuperUserOrAdministrator(DESERIALIZE); } return delegate.deserialize(className, loaderName, data); } catch (Exception e) { error = e; if (e instanceof OperationsException) throw (OperationsException)e; if (e instanceof ReflectionException) throw (ReflectionException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).deserialize(className, loaderName, data); } } }
@Override @Deprecated public ObjectInputStream deserialize(ObjectName name, byte[] data) throws OperationsException { Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = true; try { delegate = findDelegate(name); if (delegate.shouldAuthorize()) { //Special authorization authorizeSuperUserOrAdministrator(DESERIALIZE); } return delegate.deserialize(name, data); } catch (Exception e) { error = e; if (e instanceof OperationsException) throw (OperationsException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).deserialize(name, data); } } }
@Override public Object instantiate(String className) throws ReflectionException, MBeanException { Throwable error = null; MBeanServerPlugin delegate = rootMBeanServer; final boolean readOnly = false; try { if (delegate.shouldAuthorize()) { authorizeSuperUserOrAdministrator(INSTANTIATE); } return delegate.instantiate(className); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof MBeanException) throw (MBeanException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).instantiate(className); } } }
@Override public ClassLoaderRepository getClassLoaderRepository() { Throwable error = null; MBeanServerPlugin delegate = rootMBeanServer; final boolean readOnly = true; try { if (delegate.shouldAuthorize()) { //Special authorization authorizeSuperUserOrAdministrator(GET_CLASSLOADER_REPOSITORY); } return delegate.getClassLoaderRepository(); } catch (Exception e) { error = e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).getClassLoaderRepository(); } } }
@Override public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException { Throwable error = null; MBeanServerPlugin delegate = rootMBeanServer; final boolean readOnly = false; try { if (delegate.shouldAuthorize()) { authorizeSuperUserOrAdministrator(INSTANTIATE); } return delegate.instantiate(className, loaderName); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).instantiate(className, loaderName); } } }
@Override public ClassLoader getClassLoaderFor(ObjectName mbeanName) throws InstanceNotFoundException { Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = true; try { delegate = findDelegateForNewObject(mbeanName); if (delegate.shouldAuthorize()) { //Special authorization authorizeSuperUserOrAdministrator(GET_CLASSLOADER_FOR); } return delegate.getClassLoaderFor(mbeanName); } catch (Exception e) { error = e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).getClassLoaderFor(mbeanName); } } }
@Override public ClassLoader getClassLoader(ObjectName loaderName) throws InstanceNotFoundException { Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = true; try { delegate = findDelegate(loaderName); if (delegate.shouldAuthorize()) { //Special authorization authorizeSuperUserOrAdministrator(GET_CLASSLOADER); } return delegate.getClassLoader(loaderName); } catch (Exception e) { error = e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).getClassLoader(loaderName); } } }
@Override public Object instantiate(String className, Object[] params, String[] signature) throws ReflectionException, MBeanException { params = nullAsEmpty(params); signature = nullAsEmpty(signature); Throwable error = null; MBeanServerPlugin delegate = rootMBeanServer; final boolean readOnly = false; try { if (delegate.shouldAuthorize()) { authorizeSuperUserOrAdministrator(INSTANTIATE); } return delegate.instantiate(className, params, signature); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof MBeanException) throw (MBeanException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).instantiate(className, params, signature); } } }
@Override public Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, MBeanException, InstanceNotFoundException { params = nullAsEmpty(params); signature = nullAsEmpty(signature); Throwable error = null; MBeanServerPlugin delegate = rootMBeanServer; final boolean readOnly = false; try { if (delegate.shouldAuthorize()) { authorizeSuperUserOrAdministrator(INSTANTIATE); } return delegate.instantiate(className, loaderName, params, signature); } catch (Exception e) { error = e; if (e instanceof ReflectionException) throw (ReflectionException)e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).instantiate(className, loaderName, params, signature); } } }