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;
 }
Esempio n. 2
0
 protected virtual void OnReceiveAssociateReject(DicomRejectResult result, DicomRejectSource source,
                                                 DicomRejectReason reason)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Esempio n. 3
0
 /// <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();
 }
Esempio n. 4
0
 public AAssociateRJ(DicomRejectResult rt, DicomRejectSource so, DicomRejectReason rn)
 {
     _rt = rt;
     _so = so;
     _rn = rn;
 }
Esempio n. 5
0
 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");
 }
Esempio n. 6
0
 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;
 }
Esempio n. 7
0
		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);
 }
Esempio n. 9
0
 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");
     }
 }
Esempio n. 10
0
 public Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
 {
     return(CompletedTaskProvider.CompletedTask);
 }
Esempio n. 11
0
 public void OnReceiveAssociationReject(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
 {
     _client._exception = new DicomAssociationRejectedException(result, source, reason);
     _client._async.Set();
 }
Esempio n. 12
0
 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();
 }
Esempio n. 13
0
 /// <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);
 }
Esempio n. 14
0
 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);
Esempio n. 17
0
 public Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason) => Task.CompletedTask;
Esempio n. 18
0
 /// <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));
 }
Esempio n. 19
0
 public AAssociateRJ(DicomRejectResult rt, DicomRejectSource so, DicomRejectReason rn)
 {
     _rt = rt;
     _so = so;
     _rn = rn;
 }
Esempio n. 20
0
 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;
 }
Esempio n. 21
0
 public void OnReceiveAssociationReject(
     DicomRejectResult result,
     DicomRejectSource source,
     DicomRejectReason reason)
 {
     this.SetComplete();
     throw new DicomAssociationRejectedException(result, source, reason);
 }
Esempio n. 22
0
 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();
 }
Esempio n. 23
0
		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);
		}
Esempio n. 24
0
 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));
 }
Esempio n. 25
0
        public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
        {

        }
Esempio n. 26
0
 public void OnReceiveAssociateReject(DicomClient client, ClientAssociationParameters association, DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
 {
 }
Esempio n. 27
0
 public void Read(RawPDU raw)
 {
     raw.ReadByte("Reserved");
     _rt = (DicomRejectResult)raw.ReadByte("Result");
     _so = (DicomRejectSource)raw.ReadByte("Source");
     _rn = (DicomRejectReason)raw.ReadByte("Reason");
 }
Esempio n. 28
0
 internal Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
 => ExecuteWithinTransitionLock(() => State.OnReceiveAssociationRejectAsync(result, source, reason));
Esempio n. 29
0
            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();
            }
Esempio n. 30
0
        public override Task OnReceiveAssociationRejectAsync(DicomRejectResult result, DicomRejectSource source, DicomRejectReason reason)
        {
            _onAssociationRejectedTaskCompletionSource.TrySetResultAsynchronously(new DicomAssociationRejectedEvent(result, source, reason));

            return(CompletedTaskProvider.CompletedTask);
        }
Esempio n. 31
0
        /// <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;
 }