分布式计算原理和应用(Distributed Computing)第八章课件.pptVIP

  • 1
  • 0
  • 约1.15万字
  • 约 32页
  • 2017-06-07 发布于湖北
  • 举报

分布式计算原理和应用(Distributed Computing)第八章课件.ppt

Distributed Computing, M. L. Liu Advanced Remote Method Invocations M. L. Liu RMI – Advanced topics The Java RMI API has a rich collection of features. We will look at some of RMI’s more interesting advanced features, namely: stub downloading security manager client callback. Although these features are not inherent to the distributed object paradigm, they are helpful mechanisms and can be useful to application developers. The Java RMI Architecture Java RMI Client Server Interaction RMI Stub Downloading RMI is designed to allow stubs to be made available to the client dynamically. Doing so allows changes to be made in the remote methods without affecting the client program. The stub can be filed with an web server and be downloaded using HTTP. Security measures are needed to prevent both the client side and the server side: A java security policy file needs to be set on the server host and also on the client host. A Java Security Manager should be instantiated in both the client and server programs. Stub downloading If the stub is to be downloaded from a remote server, transfer the stub class to the appropriate directory on that server, e.g., /~mliu/www, and make sure that the access permission to the file is set. When activating the server, specify command options: The java.policy file The RMI security manager does not permit network access. Exceptions can be made via the specification in a java.policy file. grant { // permits socket access to all common TCP ports, including the default // RMI registry port (1099) – need for both the client and the server. permission .SocketPermission *:1024-65535, connect,accept,resolve; // permits socket access to port 80, the default HTTP port – needed // by client to contact an HTTP server for stub downloading permission .SocketPermission *:80, connect; }; This file can be filed in the same directory as the server class file. When activiating the client, a java.policy file also should be

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档