io.micronaut.starter.cli.feature.server.websocket.javaWebsocketClient.rocker.raw Maven / Gradle / Ivy
@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}/")
public abstract class @project.getClassName()Client implements AutoCloseable {
private WebSocketSession session;
@@OnOpen
public void onOpen(WebSocketSession session) {
this.session = session;
}
@@OnMessage
public void onMessage() {}
public WebSocketSession getSession() {
return session;
}
}