public DicomAssociationRejectedException( DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) : base("Association rejected [result: {0}; source: {1}; reason: {2}]", result, source, reason) { RejectResult = result; RejectSource = source; RejectReason = reason; }
protected virtual void OnReceiveAssociateReject(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { throw new Exception("The method or operation is not implemented."); }
/// <summary> /// Send association reject response. /// </summary> /// <param name="result">Rejection result.</param> /// <param name="source">Rejection source.</param> /// <param name="reason">Rejection reason.</param> protected void SendAssociationReject( DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { Logger.Info( "{logId} -> Association reject [result: {result}; source: {source}; reason: {reason}]", LogID, result, source, reason); this.SendPDUAsync(new AAssociateRJ(result, source, reason)).Wait(); }
public AAssociateRJ(DicomRejectResult rt, DicomRejectSource so, DicomRejectReason rn) { _rt = rt; _so = so; _rn = rn; }
public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { if (_type == TestTypes.AssociationReject) { Assert.IsTrue(source == DicomRejectSource.ServiceProviderACSE); Assert.IsTrue(result == DicomRejectResult.Permanent); Assert.IsTrue(reason == DicomRejectReason.NoReasonGiven); _threadStop.Set(); } else Assert.Fail("Incorrectly received OnReceiveAssociateReject callback"); }
public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { Logger.LogInfo("Association Rejection when {0} connected to remote AE {1}", association.CallingAE, association.CalledAE); _dicomClient = null; }
protected void SendAssociationReject(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { Logger.Info("{0} -> Association reject [result: {1}; source: {2}; reason: {3}]", LogID, result, source, reason); SendPDU(new AAssociateRJ(result, source, reason)); }
public override Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { _dicomClient.Logger.Warn($"[{this}] Received association reject but we already have an active association!"); return(Task.CompletedTask); }
public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { if (_type == TestTypes.AssociationReject) { Assert.IsTrue(source == DicomRejectSource.ServiceProviderACSE); Assert.IsTrue(result == DicomRejectResult.Permanent); Assert.IsTrue(reason == DicomRejectReason.NoReasonGiven); _threadStop.Set(); } else { Assert.Fail("Incorrectly received OnReceiveAssociateReject callback"); } }
public Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { return(CompletedTaskProvider.CompletedTask); }
public void OnReceiveAssociationReject(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { _client._exception = new DicomAssociationRejectedException(result, source, reason); _client._async.Set(); }
public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { Logger.LogInfo("Association Rejection when {0} connected to remote AE {1}", association.CallingAE, association.CalledAE); _verificationResult = VerificationResult.Failed; ProgressEvent.Set(); }
/// <summary> /// Called when [receive associate reject]. /// </summary> /// <param name="client">The client.</param> /// <param name="association">The association.</param> /// <param name="result">The result.</param> /// <param name="source">The source.</param> /// <param name="reason">The reason.</param> public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { FailureDescription = String.Format("Association Rejection when {0} connected to remote AE {1}:{2}", association.CallingAE, association.CalledAE, association.RemoteEndPoint); Platform.Log(LogLevel.Warn, FailureDescription); StopRunningOperation(ScuOperationStatus.AssociationRejected); }
public Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { return(DicomClient.OnReceiveAssociationRejectAsync(result, source, reason)); }
public override Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { _dicomClient.Logger.Warn($"[{this}] Received association reject but we were just in the processing of releasing the association!"); return(Task.CompletedTask); }
public abstract Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason);
public Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) => Task.CompletedTask;
/// <summary> /// Callback for handling association reject scenarios. /// </summary> /// <param name="result">Specification of rejection result.</param> /// <param name="source">Source of rejection.</param> /// <param name="reason">Detailed reason for rejection.</param> public void OnReceiveAssociationReject( DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { this.client.associateNotifier.TrySetResult(false); SetComplete(new DicomAssociationRejectedException(result, source, reason)); }
public AAssociateRJ(DicomRejectResult rt, DicomRejectSource so, DicomRejectReason rn) { _rt = rt; _so = so; _rn = rn; }
public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { Logger.LogInfo("Association Rejection when {0} connected to remote AE {1}", association.CallingAE, association.CalledAE); _dicomClient = null; }
public void OnReceiveAssociationReject( DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { this.SetComplete(); throw new DicomAssociationRejectedException(result, source, reason); }
public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { Logger.LogInfo("Association Rejection when {0} connected to remote AE {1}", association.CallingAE, association.CalledAE); _verificationResult = VerificationResult.Failed; ProgressEvent.Set(); }
protected override void OnReceiveAssociateReject(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { _handler.OnReceiveAssociateReject(this, _assoc as ClientAssociationParameters, result, source, reason); _closedOnError = true; CloseNetwork(System.Threading.Timeout.Infinite); }
protected void SendAssociationReject(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { Logger.Info("{0} -> Association reject [result: {1}; source: {2}; reason: {3}]", LogID, result, source, reason); SendPDU(new AAssociateRJ(result, source, reason)); }
public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { }
public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { }
public void Read(RawPDU raw) { raw.ReadByte("Reserved"); _rt = (DicomRejectResult)raw.ReadByte("Result"); _so = (DicomRejectSource)raw.ReadByte("Source"); _rn = (DicomRejectReason)raw.ReadByte("Reason"); }
internal Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) => ExecuteWithinTransitionLock(() => State.OnReceiveAssociationRejectAsync(result, source, reason));
public void OnReceiveAssociationReject( DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { if (_timer != null) _timer.Change(Timeout.Infinite, Timeout.Infinite); _client._exception = new DicomAssociationRejectedException(result, source, reason); _client._async.Set(); }
public override Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { _onAssociationRejectedTaskCompletionSource.TrySetResultAsynchronously(new DicomAssociationRejectedEvent(result, source, reason)); return(CompletedTaskProvider.CompletedTask); }
/// <summary> /// Method to send an association rejection. /// </summary> /// <param name="result">The </param> /// <param name="source"></param> /// <param name="reason"></param> public void SendAssociateReject(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { if (State != DicomAssociationState.Sta3_AwaitingLocalAAssociationResponsePrimative) { Platform.Log(LogLevel.Error, "Error attempting to send association reject at invalid time in association."); SendAssociateAbort(DicomAbortSource.ServiceProvider, DicomAbortReason.NotSpecified); throw new DicomNetworkException( "Attempting to send association reject at invalid time in association, aborting"); } var pdu = new AAssociateRJ(result, source, reason); EnqueuePdu(pdu.Write()); State = DicomAssociationState.Sta13_AwaitingTransportConnectionClose; if (AssociationRejected != null) AssociationRejected(source, reason); }
public DicomAssociationRejectedEvent(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) { Result = result; Source = source; Reason = reason; }