org.nustaq.kontraktor.routing.WSKrouterStarter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kontraktor-http Show documentation
Show all versions of kontraktor-http Show documentation
http connectivity for kontraktor
package org.nustaq.kontraktor.routing;
import org.nustaq.kontraktor.remoting.http.undertow.WebSocketPublisher;
import org.nustaq.kontraktor.routers.Routing;
import org.nustaq.kontraktor.util.Log;
import java.util.Arrays;
public class WSKrouterStarter {
public static void main(String[] args) {
WSKrouterStarterConfig read = WSKrouterStarterConfig.read();
Arrays.stream( read.getServices() )
.forEach( routedServiceEntry -> {
Log.Info(WSKrouterStarter.class,"start "+routedServiceEntry.strategy+":"+routedServiceEntry.encoding+"@"+routedServiceEntry.getPath());
Routing.start(
routedServiceEntry.getStrategy().getClazz(),
new WebSocketPublisher()
.hostName(read.getHost())
.port(read.getPort())
.urlPath(routedServiceEntry.getPath())
.serType(routedServiceEntry.getEncoding())
);
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy