Search in sources :

Example 1 with ClientFactory

use of com.alibaba.nacos.naming.core.v2.client.factory.ClientFactory in project nacos by alibaba.

the class ConnectionBasedClientManager method clientConnected.

@Override
public boolean clientConnected(String clientId, ClientAttributes attributes) {
    String type = attributes.getClientAttribute(ClientConstants.CONNECTION_TYPE);
    ClientFactory clientFactory = ClientFactoryHolder.getInstance().findClientFactory(type);
    return clientConnected(clientFactory.newClient(clientId, attributes));
}
Also used : ClientFactory(com.alibaba.nacos.naming.core.v2.client.factory.ClientFactory)

Example 2 with ClientFactory

use of com.alibaba.nacos.naming.core.v2.client.factory.ClientFactory in project nacos by alibaba.

the class ConnectionBasedClientManager method syncClientConnected.

@Override
public boolean syncClientConnected(String clientId, ClientAttributes attributes) {
    String type = attributes.getClientAttribute(ClientConstants.CONNECTION_TYPE);
    ClientFactory clientFactory = ClientFactoryHolder.getInstance().findClientFactory(type);
    return clientConnected(clientFactory.newSyncedClient(clientId, attributes));
}
Also used : ClientFactory(com.alibaba.nacos.naming.core.v2.client.factory.ClientFactory)

Aggregations

ClientFactory (com.alibaba.nacos.naming.core.v2.client.factory.ClientFactory)2