All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.micronaut.starter.cli.feature.server.websocket.javaWebsocketServer.rocker.raw Maven / Gradle / Ivy

There is a newer version: 4.7.0
Show newest version
@import io.micronaut.starter.application.Project

@args (
Project project
)

@if (project.getPackageName() != null) {
package @project.getPackageName();
}


import io.micronaut.websocket.WebSocketBroadcaster;
import io.micronaut.websocket.WebSocketSession;
import io.micronaut.websocket.annotation.*;

@@ServerWebSocket("/@project.getPropertyName()/{topic}")
public class @project.getClassName()Server {
    private WebSocketBroadcaster broadcaster;

    public @project.getClassName()Server(WebSocketBroadcaster broadcaster) {
        this.broadcaster = broadcaster;
    }

    @@OnOpen
    public void onOpen() {}

    @@OnMessage
    public void onMessage() {}

    @@OnClose
    public void onClose() {}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy