⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rmiconnectionimpl.java

📁 java1.6众多例子参考
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                throw (NotCompliantMBeanException) e;            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public ObjectInstance createMBean(String className,                                 ObjectName name,                                 ObjectName loaderName,                                 MarshalledObject params,                                 String signature[],                                 Subject delegationSubject)        throws        ReflectionException,        InstanceAlreadyExistsException,        MBeanRegistrationException,        MBeanException,        NotCompliantMBeanException,        InstanceNotFoundException,        IOException {        final Object[] values;        final boolean debug = logger.debugOn();	if (debug) logger.debug(		 "createMBean(String,ObjectName,ObjectName,Object[],String[])",                 "connectionId=" + connectionId                  +", unwrapping params with MBean extended ClassLoader.");	values = nullIsEmpty(unwrap(params,                                    getClassLoader(loaderName),                                    defaultClassLoader,                                    Object[].class));	        try {            final Object params2[] =               new Object[] { className, name, loaderName, values,			      nullIsEmpty(signature) };           if (debug) logger.debug(		 "createMBean(String,ObjectName,ObjectName,Object[],String[])",                 "connectionId=" + connectionId                 +", className=" + className                 +", name=" + name                 +", loaderName=" + loaderName                 +", params=" + objects(values)                 +", signature=" + strings(signature));            return (ObjectInstance)                doPrivilegedOperation(                  CREATE_MBEAN_LOADER_PARAMS,                  params2,                  delegationSubject);        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof ReflectionException)                throw (ReflectionException) e;            if (e instanceof InstanceAlreadyExistsException)                throw (InstanceAlreadyExistsException) e;            if (e instanceof MBeanRegistrationException)                throw (MBeanRegistrationException) e;            if (e instanceof MBeanException)                throw (MBeanException) e;            if (e instanceof NotCompliantMBeanException)                throw (NotCompliantMBeanException) e;            if (e instanceof InstanceNotFoundException)                throw (InstanceNotFoundException) e;            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public void unregisterMBean(ObjectName name, Subject delegationSubject)        throws        InstanceNotFoundException,        MBeanRegistrationException,        IOException {        try {            final Object params[] = new Object[] { name };            if (logger.debugOn()) logger.debug("unregisterMBean",                 "connectionId=" + connectionId                 +", name="+name);            doPrivilegedOperation(              UNREGISTER_MBEAN,              params,              delegationSubject);        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof InstanceNotFoundException)                throw (InstanceNotFoundException) e;            if (e instanceof MBeanRegistrationException)                throw (MBeanRegistrationException) e;            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public ObjectInstance getObjectInstance(ObjectName name,                                            Subject delegationSubject)        throws        InstanceNotFoundException,        IOException {	checkNonNull("ObjectName", name);        try {            final Object params[] = new Object[] { name };            if (logger.debugOn()) logger.debug("getObjectInstance",                 "connectionId=" + connectionId                 +", name="+name);            return (ObjectInstance)                doPrivilegedOperation(                  GET_OBJECT_INSTANCE,                  params,                  delegationSubject);        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof InstanceNotFoundException)                throw (InstanceNotFoundException) e;            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public Set<ObjectInstance>	queryMBeans(ObjectName name,		    MarshalledObject query,		    Subject delegationSubject)        throws IOException {        final QueryExp queryValue;        final boolean debug=logger.debugOn();	if (debug) logger.debug("queryMBeans",                 "connectionId=" + connectionId                 +" unwrapping query with defaultClassLoader.");	queryValue = unwrap(query, defaultClassLoader, QueryExp.class);        try {            final Object params[] = new Object[] { name, queryValue };            if (debug) logger.debug("queryMBeans",                 "connectionId=" + connectionId                 +", name="+name +", query="+query);            return (Set)                doPrivilegedOperation(                  QUERY_MBEANS,                  params,                  delegationSubject);        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public Set<ObjectName>	queryNames(ObjectName name,		   MarshalledObject query,		   Subject delegationSubject)        throws IOException {        final QueryExp queryValue;        final boolean debug=logger.debugOn();	if (debug) logger.debug("queryNames",                 "connectionId=" + connectionId                 +" unwrapping query with defaultClassLoader.");	queryValue = unwrap(query, defaultClassLoader, QueryExp.class);        try {            final Object params[] = new Object[] { name, queryValue };            if (debug) logger.debug("queryNames",                 "connectionId=" + connectionId                 +", name="+name +", query="+query);            return (Set)                doPrivilegedOperation(                  QUERY_NAMES,                  params,                  delegationSubject);        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public boolean isRegistered(ObjectName name,                                Subject delegationSubject) throws IOException {        try {            final Object params[] = new Object[] { name };            return ((Boolean)                doPrivilegedOperation(                  IS_REGISTERED,                  params,                  delegationSubject)).booleanValue();        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public Integer getMBeanCount(Subject delegationSubject)        throws IOException {        try {            final Object params[] = new Object[] { };            if (logger.debugOn()) logger.debug("getMBeanCount",                 "connectionId=" + connectionId);            return (Integer)                doPrivilegedOperation(                  GET_MBEAN_COUNT,                  params,                  delegationSubject);        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public Object getAttribute(ObjectName name,                               String attribute,                               Subject delegationSubject)        throws        MBeanException,        AttributeNotFoundException,        InstanceNotFoundException,        ReflectionException,        IOException {        try {            final Object params[] = new Object[] { name, attribute };            if (logger.debugOn()) logger.debug("getAttribute",                                   "connectionId=" + connectionId                                   +", name=" + name                                    +", attribute="+ attribute);            return (Object)                doPrivilegedOperation(                  GET_ATTRIBUTE,                  params,                  delegationSubject);        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof MBeanException)                throw (MBeanException) e;            if (e instanceof AttributeNotFoundException)                throw (AttributeNotFoundException) e;            if (e instanceof InstanceNotFoundException)                throw (InstanceNotFoundException) e;            if (e instanceof ReflectionException)                throw (ReflectionException) e;            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public AttributeList getAttributes(ObjectName name,                                       String[] attributes,                                       Subject delegationSubject)        throws        InstanceNotFoundException,        ReflectionException,        IOException {        try {            final Object params[] = new Object[] { name, attributes };            if (logger.debugOn()) logger.debug("getAttributes",                                   "connectionId=" + connectionId                                   +", name=" + name                                    +", attributes="+ strings(attributes));            return (AttributeList)                doPrivilegedOperation(                  GET_ATTRIBUTES,                  params,                  delegationSubject);        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof InstanceNotFoundException)                throw (InstanceNotFoundException) e;            if (e instanceof ReflectionException)                throw (ReflectionException) e;            if (e instanceof IOException)                throw (IOException) e;            throw newIOException("Got unexpected server exception: " + e, e);        }    }    public void setAttribute(ObjectName name,                             MarshalledObject attribute,                             Subject delegationSubject)        throws        InstanceNotFoundException,        AttributeNotFoundException,        InvalidAttributeValueException,        MBeanException,        ReflectionException,        IOException {        final Attribute attr;        final boolean debug=logger.debugOn();	if (debug) logger.debug("setAttribute",                 "connectionId=" + connectionId                 +" unwrapping attribute with MBean extended ClassLoader.");	attr = unwrap(attribute,		      getClassLoaderFor(name),		      defaultClassLoader,                      Attribute.class);        try {            final Object params[] = new Object[] { name, attr };            if (debug) logger.debug("setAttribute",                             "connectionId=" + connectionId                             +", name="+name                             +", attribute="+attr);            doPrivilegedOperation(              SET_ATTRIBUTE,              params,              delegationSubject);        } catch (PrivilegedActionException pe) {            Exception e = extractException(pe);            if (e instanceof InstanceNotFoundException)                throw (InstanceNotFoundException) e;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -