lm-sistemi-software-distrib.../src/main/kotlin/drills/drill08/exercise2/Finder.kt

19 lines
435 B
Kotlin
Raw Normal View History

2020-04-25 16:49:06 +00:00
package drills.drill08.exercise2
import java.rmi.Remote
import java.rmi.RemoteException
import java.rmi.server.UnicastRemoteObject
interface Finder : Remote {
@Throws(RemoteException::class)
fun find(str: String): Boolean
}
class FakeFinder : UnicastRemoteObject(), Finder {
override fun find(str: String): Boolean {
println(str)
for (i in 0 until 100000000L);
return str.length % 2 == 0
}
}