by
0
6
170k
0
Top 1% !
Popular
Pearl of Wisdom
Tagged
Specified
OpenSource
Popularity: 10554th place

Published on:

LanguageJava
LicenseMIT_X11

Simple RMI Java interface

A simple RMI interface example. 
A remote interface extends the interface java.rmi.Remote and declares a set of remote methods. Each remote method must declare java.rmi.RemoteException (or a superclass of RemoteException) in its throws clause, in addition to any application-specific exceptions.
This interface declares just one method, sayHello, which returns a string to the caller.

A remote object is an instance of a class that implements a remote interface.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/32350/Simple-RMI-Java-interface?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
package example.hello; import java.rmi.Remote; import java.rmi.RemoteException; public interface Hello extends Remote { String sayHello() throws RemoteException; }

Other Steps and Solutions

If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus