Java remote method invocation: Difference between revisions

Content deleted Content added
RedBot (talk | contribs)
m r2.7.2) (Robot: Adding hu:Java remote method invocation
Phoenix720 (talk | contribs)
m style
Line 21:
The following classes implement a simple client-server program using RMI that displays a message.
 
'''<code>RmiServer </code> class''' &mdash;Listens listens to RMI requests and implements the interface which is used by the client to invoke remote methods.
 
<source lang=java>
Line 77:
</source>
 
'''<code>RmiServerIntf </code> classinterface'''&mdash;Defines — defines the interface that is used by the client and implemented by the server.
 
<source lang=java>
Line 88:
</source>
 
'''<code>RmiClient </code> class''' &mdash;This this is the client which gets the reference (a proxy) to the remote object living on the server and invokes its method to get a message. If the server object implemented java.io.Serializable instead of java.rmi.Remote, it would be serialized and passed to the client as a value<ref>http://www.javaworld.com/javaworld/jw-11-2000/jw-1110-smartproxy.html</ref>.
 
<source lang=java>
Line 131:
Note that since version 5.0 of J2SE support for dynamically generated stub files has been added, and rmic is only provided for backwards compatibility with earlier run times.<ref>{{cite web|title=Jave RMI Release Notes|url=http://docs.oracle.com/javase/1.5.0/docs/guide/rmi/relnotes.html|publisher=Oracle|accessdate=9 May 2012}}</ref>
 
'''<code>server.policy</code>''' &mdash;This this file is required on the server to allow TCP/IP communication for the remote registry and for the RMI server.
 
<source lang=java>
Line 145:
</source>
 
'''<code>client.policy</code>''' &mdash;This this file is required on the client to connect to RMI Server using TCP/IP.
 
<source lang=java>
grant {
Line 153:
</source>
 
'''<code>no.policy</code>''' &mdash;Also also if you have any troubles with connecting, try this file for server or client.
 
<source lang=java>