17 lines
385 B
Kotlin
17 lines
385 B
Kotlin
package drills.drill01.exercise2
|
|
|
|
import java.rmi.Remote
|
|
import java.rmi.RemoteException
|
|
import java.rmi.server.UnicastRemoteObject
|
|
|
|
interface PrintService : Remote {
|
|
@Throws(RemoteException::class)
|
|
fun print(s: String)
|
|
}
|
|
|
|
class PrintServiceImpl(val name: String) : PrintService, UnicastRemoteObject() {
|
|
override fun print(s: String) {
|
|
println("$name: $s")
|
|
}
|
|
}
|