Ejemplo n.º 1
0
        public DcmHandler(AcceptorPolicy policy, DcmServiceRegistry services)
        {
            if (policy == null)
                throw new System.NullReferenceException();

            if (services == null)
                throw new System.NullReferenceException();

            this.policy = policy;
            this.services = services;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 public AcceptorPolicyService()
 {
     policy = assocFact.NewAcceptorPolicy();
      for (int i = 1; i < AS_UIDS.Length; ++i)
     {
         policy.PutPresContext(AS_UIDS[i], TS_UIDS);
     }
     PatientRootRelationalQuery = true;
     StudyRootRelationalQuery = true;
     PatientRootRelationalRetrieve = true;
     StudyRootRelationalRetrieve = true;
     MaxNumOpsInvoked = 0;
 }
Ejemplo n.º 3
0
        public PduI Accept(AcceptorPolicy policy, int timeout)
        {
            NDC.Push(name);
            try
            {
                PduI rq = fsm.Read(timeout, b10);
                if (!(rq is AAssociateRQ))
                    return (AAbort) rq;

                PduI rp = policy.Negotiate((AAssociateRQ) rq);
                if (rp is AAssociateAC)
                    fsm.Write((AAssociateAC) rp);
                else
                    fsm.Write((AAssociateRJ) rp);
                return rp;
            }
            finally
            {
                NDC.Pop();
            }
        }
Ejemplo n.º 4
0
 private void PutPolicyForXXXAET(String aet, AcceptorPolicy policy, Hashtable map)
 {
     if (policy != null)
     {
         map.Add(StringUtils.CheckAET(aet), policy);
     }
     else
     {
         map.Remove(aet);
     }
 }
Ejemplo n.º 5
0
 public virtual void PutPolicyForCallingAET(String aet, AcceptorPolicy policy)
 {
     PutPolicyForXXXAET(aet, policy, policyForCallingAET);
 }
Ejemplo n.º 6
0
 public virtual DcmHandlerI newDcmHandler(AcceptorPolicy policy, DcmServiceRegistry services)
 {
     return new DcmHandler(policy, services);
 }