lm-sistemi-software-distrib.../src/main/kotlin/drills/drill07/exercise3/hello/Requestor.kt

16 lines
408 B
Kotlin

package drills.drill07.exercise3.hello
import drills.drill07.exercise3.requestor.ActiveMQRequestor
import drills.drill07.exercise3.requestor.Requestor
import javax.jms.TextMessage
fun main() {
val requestor: Requestor = ActiveMQRequestor("hello", shared = true)
val msg = requestor.request(requestor.createTextMessage("Hello Home!")) as TextMessage
println(msg.text)
requestor.close()
}