Search in sources :

Example 1 with RemoteCommonServiceHandler

use of org.apache.skywalking.apm.collector.remote.grpc.handler.RemoteCommonServiceHandler in project incubator-skywalking by apache.

the class RemoteModuleGRPCProvider method start.

@Override
public void start(Properties config) throws ServiceNotProvidedException {
    String host = config.getProperty(HOST);
    Integer port = (Integer) config.get(PORT);
    GRPCManagerService managerService = getManager().find(GRPCManagerModule.NAME).getService(GRPCManagerService.class);
    GRPCServer gRPCServer = managerService.createIfAbsent(host, port);
    gRPCServer.addHandler(new RemoteCommonServiceHandler(remoteDataRegisterService));
    ModuleRegisterService moduleRegisterService = getManager().find(ClusterModule.NAME).getService(ModuleRegisterService.class);
    moduleRegisterService.register(RemoteModule.NAME, this.name(), new RemoteModuleGRPCRegistration(host, port));
    ModuleListenerService moduleListenerService = getManager().find(ClusterModule.NAME).getService(ModuleListenerService.class);
    moduleListenerService.addListener(remoteSenderService);
}
Also used : GRPCManagerService(org.apache.skywalking.apm.collector.grpc.manager.service.GRPCManagerService) GRPCServer(org.apache.skywalking.apm.collector.server.grpc.GRPCServer) ModuleRegisterService(org.apache.skywalking.apm.collector.cluster.service.ModuleRegisterService) ModuleListenerService(org.apache.skywalking.apm.collector.cluster.service.ModuleListenerService) RemoteCommonServiceHandler(org.apache.skywalking.apm.collector.remote.grpc.handler.RemoteCommonServiceHandler)

Aggregations

ModuleListenerService (org.apache.skywalking.apm.collector.cluster.service.ModuleListenerService)1 ModuleRegisterService (org.apache.skywalking.apm.collector.cluster.service.ModuleRegisterService)1 GRPCManagerService (org.apache.skywalking.apm.collector.grpc.manager.service.GRPCManagerService)1 RemoteCommonServiceHandler (org.apache.skywalking.apm.collector.remote.grpc.handler.RemoteCommonServiceHandler)1 GRPCServer (org.apache.skywalking.apm.collector.server.grpc.GRPCServer)1