io.micronaut.starter.cli.feature.server.websocket.groovyWebsocketClient.rocker.raw Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of micronaut-cli Show documentation
Show all versions of micronaut-cli Show documentation
Generates Micronaut applications
@import io.micronaut.starter.application.Project
@args (
Project project
)
@if (project.getPackageName() != null) {
package @project.getPackageName()
}
import io.micronaut.websocket.WebSocketSession
import io.micronaut.websocket.annotation.*
@@ClientWebSocket("/@project.getPropertyName()/{topic}/")
abstract class @project.getClassName()Client implements AutoCloseable {
private WebSocketSession session
@@OnOpen
void onOpen(WebSocketSession session) {
this.session = session
}
@@OnMessage
void onMessage() {}
}