public MemberAttributeEvent(ICluster cluster, IMember member, MemberAttributeOperationType operationType, string key, object value) : base(cluster, member, MemberAttributeChanged, null) { _member = (Member) member; _operationType = operationType; _key = key; _value = value; }
private void ManagerAuthenticator(ClientConnection connection) { Logger.Finest("Authenticating against the owner node"); var ss = _client.GetSerializationService(); string uuid = null; string ownerUuid = null; if (_principal != null) { uuid = _principal.GetUuid(); ownerUuid = _principal.GetOwnerUuid(); } ClientMessage request; if (_credentials is UsernamePasswordCredentials) { var usernamePasswordCr = (UsernamePasswordCredentials) _credentials; request = ClientAuthenticationCodec.EncodeRequest(usernamePasswordCr.GetUsername(), usernamePasswordCr.GetPassword(), uuid, ownerUuid, true, ClientTypes.Csharp, _client.GetSerializationService().GetVersion()); } else { var data = ss.ToData(_credentials); request = ClientAuthenticationCustomCodec.EncodeRequest(data, uuid, ownerUuid, false, ClientTypes.Csharp, _client.GetSerializationService().GetVersion()); } connection.Init(); IClientMessage response; try { var invocationService = (ClientInvocationService) _client.GetInvocationService(); response = ThreadUtil.GetResult(invocationService.InvokeOnConnection(request, connection)); } catch (Exception e) { throw ExceptionUtil.Rethrow(e); } var result = ClientAuthenticationCodec.DecodeResponse(response); var member = new Member(result.address, result.ownerUuid); _principal = new ClientPrincipal(result.uuid, result.ownerUuid); connection.SetRemoteMember(member); }