Search in sources :

Example 1 with UnSubscribeServiceRequest

use of com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest in project sofa-rpc by sofastack.

the class MeshRegistry method unSubscribe.

@Override
public void unSubscribe(ConsumerConfig config) {
    UnSubscribeServiceRequest unsubscribeRequest = buildUnSubscribeServiceRequest(config);
    client.unSubscribeService(unsubscribeRequest);
}
Also used : UnSubscribeServiceRequest(com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest)

Example 2 with UnSubscribeServiceRequest

use of com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest in project sofa-rpc by sofastack.

the class MeshRegistry method buildUnSubscribeServiceRequest.

protected UnSubscribeServiceRequest buildUnSubscribeServiceRequest(ConsumerConfig config) {
    UnSubscribeServiceRequest unsubscribeRequest = new UnSubscribeServiceRequest();
    String key = MeshRegistryHelper.buildMeshKey(config, config.getProtocol());
    unsubscribeRequest.setServiceName(key);
    return unsubscribeRequest;
}
Also used : UnSubscribeServiceRequest(com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest)

Example 3 with UnSubscribeServiceRequest

use of com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest in project sofa-rpc by sofastack.

the class MeshApiClientTest method testUnSubscribe.

@Test
public void testUnSubscribe() {
    UnSubscribeServiceRequest request = new UnSubscribeServiceRequest();
    request.setServiceName("com.alipay.rpc.common.service.facade.pb.SampleServicePb:1.0@DEFAULT");
    boolean result = meshApiClient.unSubscribeService(request);
    Assert.assertTrue(result);
}
Also used : UnSubscribeServiceRequest(com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest) Test(org.junit.Test)

Aggregations

UnSubscribeServiceRequest (com.alipay.sofa.rpc.registry.mesh.model.UnSubscribeServiceRequest)3 Test (org.junit.Test)1