开发者

RMISecurityManager vs. SecurityManager

According to the Java API documentation,

RMISecurityManager implements a policy that is no different than the policy implemented by SecurityManager. Therefore an RMI application should use the SecurityManager class or another application-specific SecurityManager implementation instead of this class.

If this is the case, then what开发者_StackOverflow中文版 is the point of having a separate RMISecurityManager class? Are there any situations where it should be used over SecurityManager?


There is no point. If you look at the definition of RMISecurityManager:

public class RMISecurityManager extends SecurityManager {

    /**
     * Constructs a new <code>RMISecurityManager</code>.
     * @since JDK1.1
     */
    public RMISecurityManager() {
    }
}

It really does nothing. My guess is that it exists for historical reasons. You never really gain anything by using it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜