268. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:44 PM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

268.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomCommon\src\java\gov\va\med\imaging\dicom\common\stats DicomServiceStats.java Mon Dec 4 21:35:14 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingDicomCommon\src\java\gov\va\med\imaging\dicom\common\stats DicomServiceStats.java Mon Dec 4 22:02:17 2017 UTC

268.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 1476
Changed 2 12
Inserted 0 0
Removed 0 0

268.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

268.4 Active regular expressions

No regular expressions were active.

268.5 Comparison detail

  1   /**
  2    * 
  3     Package:  MAG - Vis tA Imaging
  4     WARNING:  Per VHA D irective 2 004-038, t his routin e should n ot be modi fied.
  5     Date Cre ated: 
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7     Develope r:  vhaisw peterb
  8     Descript ion: 
  9  
  10           ;;  +-------- ---------- ---------- ---------- ---------- ---------- ---------- +
  11           ;;  Property  of the US  Government .
  12           ;;  No permis sion to co py or redi stribute t his softwa re is give n.
  13           ;;  Use of un released v ersions of  this soft ware requi res the us er
  14           ;;   to execu te a writt en test ag reement wi th the Vis tA Imaging
  15           ;;   Developm ent Office  of the De partment o f Veterans  Affairs,
  16           ;;   telephon e (301) 73 4-0100.
  17           ;;
  18           ;;  The Food  and Drug A dministrat ion classi fies this  software a s
  19           ;;  a Class I I medical  device.  A s such, it  may not b e changed
  20           ;;  in any wa y.  Modifi cations to  this soft ware may r esult in a n
  21           ;;  adulterat ed medical  device un der 21CFR8 20, the us e of which
  22           ;;  is consid ered to be  a violati on of US F ederal Sta tutes.
  23           ;;  +-------- ---------- ---------- ---------- ---------- ---------- ---------- +
  24  
  25   */
  26  
  27   package go v.va.med.i maging.dic om.common. stats;
  28  
  29   import gov .va.med.im aging.Imag ingMBean;
  30  
  31   import jav a.lang.man agement.Ma nagementFa ctory;
  32   import jav a.util.Has hSet;
  33   import jav a.util.Has htable;
  34   import jav a.util.Ite rator;
  35   import jav a.util.Set ;
  36  
  37   import jav ax.managem ent.MBeanS erver;
  38   import jav ax.managem ent.Object Name;
  39  
  40   import org .apache.lo gging.log4 j.LogManag er;
  41   import org .apache.lo gging.log4 j.Logger;
  42  
  43   public cla ss DicomSe rviceStats  implement s DicomSer viceStatsM Bean {
  44  
  45           pu blic stati c final St ring UP =  "LISTENING ";
  46           pu blic stati c final St ring DOWN  = "NOT LIS TENING";
  47           pu blic stati c final St ring FAILE D = "FAILE D TO LISTE N";
  48           pu blic stati c final St ring CSTOR E = "C-Sto re";
  49           pu blic stati c final St ring CFIND  = "C-Find ";
  50           pu blic stati c final St ring CMOVE  = "C-Move ";
  51           pu blic stati c final St ring CECHO  = "C-Echo ";
  52           
  53           
  54           pr ivate stat ic DicomSe rviceStats  instance_  = null;
  55           pr ivate stat ic ObjectN ame dicomS erviceStat sMBeanName  = null;
  56       privat e static L ogger logg er = LogMa nager.getL ogger (Dic omServiceS tats.class );
  57           
  58           pr ivate int  totalRADOb jectsToCor rectForHDI G;
  59           pr ivate int  totalCONOb jectsToCor rectForHDI G;
  60           
  61           pr ivate int  dicomCorre ctWorkItem Count;
  62           pr ivate int  networkImp ortWorkIte mCount;
  63           pr ivate int  stagedMedi aWorkItemC ount;
  64           pr ivate int  failedWork ItemCount;
  65           
  66           pr ivate bool ean servic eAccountVa lid;
  67  
  68           pr ivate Set< ListeningP ortStatist ics> curre ntPortsSta tus;
  69           pr ivate Set< InboundDic omAssociat ionStatist ics> inbou ndAssociat ionStats;
  70           pr ivate Set< InboundDic omDimseSta tistics> d imseServic eStats;
  71           pr ivate Set< InboundMod alityDevic eStatistic s> deviceS tats;
  72           pr ivate Set< InboundSOP ClassStati stics> sop ClassStats ;
  73           pr ivate Set< InboundDic omObjectSt atistics>  storageSCP Stats;
  74           pr ivate Set< OutboundDi comObjectS tatistics>  storageSC UStats;
  75           pr ivate Set< OutboundDi comAssocia tionStatis tics> outb oundAssoci ationStats ;
  76  
  77           pr ivate Dico mServiceSt ats(){
  78                    
  79                    curr entPortsSt atus = new  HashSet<L isteningPo rtStatisti cs>();
  80                    inbo undAssocia tionStats  = new Hash Set<Inboun dDicomAsso ciationSta tistics>() ;
  81                    dims eServiceSt ats = new  HashSet<In boundDicom DimseStati stics>();
  82                    devi ceStats =  new HashSe t<InboundM odalityDev iceStatist ics>();
  83                    sopC lassStats  = new Hash Set<Inboun dSOPClassS tatistics> ();
  84                    stor ageSCPStat s = new Ha shSet<Inbo undDicomOb jectStatis tics>();
  85                    stor ageSCUStat s = new Ha shSet<Outb oundDicomO bjectStati stics>();
  86                    outb oundAssoci ationStats  = new Has hSet<Outbo undDicomAs sociationS tatistics> ();
  87                    
  88                    tota lRADObject sToCorrect ForHDIG =  0;
  89                    tota lCONObject sToCorrect ForHDIG =  0;
  90                    
  91                    dico mCorrectWo rkItemCoun t = 0;
  92                    netw orkImportW orkItemCou nt = 0;
  93                    stag edMediaWor kItemCount  = 0;
  94                    fail edWorkItem Count = 0;
  95                    serv iceAccount Valid = tr ue;
  96  
  97           }
  98  
  99           pu blic synch ronized st atic Dicom ServiceSta ts getInst ance(){
  100                    if(i nstance_ = = null){
  101                             instan ce_ = new  DicomServi ceStats();
  102                             regist erResource MBeans();
  103                    }
  104                    retu rn instanc e_;
  105           }
  106           
  107           /*  (non-Java doc)
  108            *  @see gov. va.med.ima ging.dicom .common.st ats.DicomS erviceStat sMBean#get TotalRADOb jectsToCor rectForHDI G()
  109            * /
  110           @O verride
  111           pu blic int g etTotalRAD ObjectsToC orrectForH DIG() {
  112                    
  113                    retu rn this.to talRADObje ctsToCorre ctForHDIG;
  114           }
  115  
  116           /*  (non-Java doc)
  117            *  @see gov. va.med.ima ging.dicom .common.st ats.DicomS erviceStat sMBean#get TotalCONOb jectsToCor rectForHDI G()
  118            * /
  119           @O verride
  120           pu blic int g etTotalCON ObjectsToC orrectForH DIG() {
  121                    
  122                    retu rn this.to talCONObje ctsToCorre ctForHDIG;
  123           }
  124           
  125           pu blic void  incrementI nboundAsso ciationAcc eptCount(S tring aet,  String ip Addr){
  126                    try  {
  127                             Inboun dDicomAsso ciationSta tistics as soc = getF romInbound Associatio nList(aet. toUpperCas e(), ipAdd r);
  128                             assoc. incrementA cceptedAss ociationsC ount();
  129                    } ca tch (Excep tion X) {
  130                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  131                    }
  132           }
  133  
  134           pu blic void  incrementI nboundAsso ciationRej ectCount(S tring aet,  String ip Addr){
  135                    try  {
  136                             Inboun dDicomAsso ciationSta tistics as soc = getF romInbound Associatio nList(aet. toUpperCas e(), ipAdd r);
  137                             assoc. incrementR ejectedAss ociationsC ount();
  138                    } ca tch (Excep tion X) {
  139                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  140                    }
  141           }
  142           
  143           pu blic void  incrementI nboundDims eMessageAc ceptCount( String aet , String d imseServic e){
  144                    try  {
  145                             Inboun dDicomDims eStatistic s dimse =  getFromDim seList(aet .toUpperCa se(), dims eService);
  146                             dimse. incrementP rocessedDi mseMessage Count();
  147                    } ca tch (Excep tion X) {
  148                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  149                    }
  150           }
  151  
  152           pu blic void  incrementI nboundDims eMessageRe jectCount( String aet , String d imseServic e){
  153                    try  {
  154                             Inboun dDicomDims eStatistic s dimse =  getFromDim seList(aet .toUpperCa se(), dims eService);
  155                             dimse. incrementR ejectedDim seMessageC ount();
  156                    } ca tch (Excep tion X) {
  157                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  158                    }
  159           }
  160  
  161           pu blic void  incrementI nboundObje ctProcesse dCount(Str ing aet, S tring manu facturer,  String mod el, String  sopClassU ID){
  162                    try  {
  163                             Inboun dDicomObje ctStatisti cs storage   = getFro mStorageSC PList(aet. toUpperCas e());
  164                             storag e.incremen tObjectsPr ocessedCou nt();
  165  
  166                             Inboun dModalityD eviceStati stics devi ce  = getF romModalit yDeviceLis t(manufact urer, mode l);
  167                             device .increment DicomObjec tsProcesse dCount();
  168  
  169                             Inboun dSOPClassS tatistics  sopClass =  getFromSO PClassList (sopClassU ID);
  170                             sopCla ss.increme ntDicomObj ectsProces sedCount() ;
  171                    } ca tch (Excep tion X) {
  172                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  173                    }
  174           }
  175  
  176           pu blic void  incrementI nboundObje ctRejected Count(Stri ng aet, St ring manuf acturer, S tring mode l, String  sopClassUI D){
  177                    try  {
  178                             Inboun dDicomObje ctStatisti cs storage   = getFro mStorageSC PList(aet. toUpperCas e());
  179                             storag e.incremen tObjectsRe jectedCoun t();
  180  
  181                             Inboun dModalityD eviceStati stics devi ce  = getF romModalit yDeviceLis t(manufact urer, mode l);
  182                             device .increment DicomObjec tsRejected Count();
  183  
  184                             Inboun dSOPClassS tatistics  sopClass =  getFromSO PClassList (sopClassU ID);
  185                             sopCla ss.increme ntDicomObj ectsReject edCount();
  186                    } ca tch (Excep tion X) {
  187                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  188                    }
  189           }
  190                    
  191           pu blic void  incrementI nboundObje ctsPassedT oLegacyGWC ount(Strin g aet){
  192                    try  {
  193                             Inboun dDicomObje ctStatisti cs storage   = getFro mStorageSC PList(aet. toUpperCas e());
  194                             storag e.incremen tObjectsPa ssedToLega cyGWCount( );
  195                    } ca tch (Excep tion X) {
  196                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  197                    }                 
  198           }
  199  
  200           pu blic void  incrementI nboundObje ctsPassedT oHDIGDataS tructureCo unt(String  aet){
  201                    try  {
  202                             Inboun dDicomObje ctStatisti cs storage   = getFro mStorageSC PList(aet. toUpperCas e());
  203                             storag e.incremen tObjectsPa ssedToHDIG DataStruct ureCount() ;
  204                    } ca tch (Excep tion X) {
  205                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  206                    }                 
  207           }
  208  
  209           pu blic void  incrementI nboundDupl icateObjec tCount(Str ing aet, S tring manu facturer,  String mod el){
  210                    try  {
  211                             Inboun dDicomObje ctStatisti cs storage   = getFro mStorageSC PList(aet. toUpperCas e());
  212                             storag e.incremen tDuplicate ObjectsCou nt();
  213  
  214                             Inboun dModalityD eviceStati stics devi ce  = getF romModalit yDeviceLis t(manufact urer, mode l);
  215                             device .increment TotalDupli cateObject sCount();
  216                    } ca tch (Excep tion X) {
  217                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  218                    }
  219           }
  220  
  221           pu blic void  incrementD uplicateIn stanceUIDs Count(Stri ng manufac turer, Str ing model) {
  222                    try  {
  223                             Inboun dModalityD eviceStati stics devi ce  = getF romModalit yDeviceLis t(manufact urer, mode l);
  224                             device .increment DuplicateI nstanceUID sCount();
  225                    } ca tch (Excep tion X) {
  226                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  227                    }
  228           }
  229           
  230           pu blic void  incrementI ODViolatio nCount(Str ing manufa cturer, St ring model ){
  231                    try  {
  232                             Inboun dModalityD eviceStati stics devi ce  = getF romModalit yDeviceLis t(manufact urer, mode l);
  233                             device .increment DicomObjec tsWithIODV iolationsC ount();
  234                    } ca tch (Excep tion X) {
  235                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  236                    }
  237           }
  238           
  239           pu blic void  incrementO utboundObj ectTransmi ttedCount( String aet ){
  240                    try  {
  241                             Outbou ndDicomObj ectStatist ics transm it  = getF romStorage SCUList(ae t);
  242                             transm it.increme ntObjectsT ransmitted ToSCPCount ();
  243                    } ca tch (Excep tion X) {
  244                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  245                    }
  246           }
  247  
  248           pu blic void  incrementO utboundObj ectRejecte dCount(Str ing aet){
  249                    try  {
  250                             Outbou ndDicomObj ectStatist ics transm it  = getF romStorage SCUList(ae t);
  251                             transm it.increme ntObjectsR ejectedByS CPCount();
  252                    } ca tch (Excep tion X) {
  253                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  254                    }
  255           }
  256  
  257           pu blic void  incrementO utboundAss ociationAc ceptCount( String aet ){
  258                    try  {
  259                             Outbou ndDicomAss ociationSt atistics t ransmit  =  getFromOu tboundAsso ciationLis t(aet);
  260                             transm it.increme ntAccepted Associatio nsCount();
  261                    } ca tch (Excep tion X) {
  262                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  263                    }
  264           }
  265           
  266           pu blic void  incrementO utboundAss ociationRe jectCount( String aet ){
  267                    try  {
  268                             Outbou ndDicomAss ociationSt atistics t ransmit  =  getFromOu tboundAsso ciationLis t(aet);
  269                             transm it.increme ntRejected Associatio nsCount();
  270                    } ca tch (Excep tion X) {
  271                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  272                    }
  273           }
  274  
  275           pu blic void  setCurrent PortStatus (int port,  String co ndition){
  276                    try  {
  277                             Listen ingPortSta tistics li stenPort =  getFromPo rtList(por t);
  278                             listen Port.setCu rrentStatu s(conditio n);
  279                    } ca tch (Excep tion X) {
  280                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  281                    }
  282           }
  283  
  284           /* *
  285            *  @param to talRADObje ctsToCorre ctForHDIG  the totalR ADObjectsT oCorrectFo rHDIG to s et
  286            * /
  287           pu blic void  setTotalRA DObjectsTo CorrectFor HDIG(int t otalRADObj ectsToCorr ectForHDIG ){
  288                    try  {
  289                             this.t otalRADObj ectsToCorr ectForHDIG  = totalRA DObjectsTo CorrectFor HDIG;
  290                    } ca tch (Excep tion X) {
  291                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  292                    }
  293           }
  294  
  295           /* *
  296            *  @param to talCONObje ctsToCorre ctForHDIG  the totalC ONObjectsT oCorrectFo rHDIG to s et
  297            * /
  298           pu blic void  setTotalCO NObjectsTo CorrectFor HDIG(int t otalCONObj ectsToCorr ectForHDIG ){
  299                    try  {
  300                             this.t otalCONObj ectsToCorr ectForHDIG  = totalCO NObjectsTo CorrectFor HDIG;
  301                    } ca tch (Excep tion X) {
  302                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  303                    }
  304           }
  305           
  306           /* *
  307            *  @param ae t
  308            *  @param ma nufacturer
  309            *  @param mo del
  310            *  @param so pClassName
  311            * /
  312           pu blic void  incrementI nboundAcce ptCount(St ring aet,  String man ufacturer,  String mo del, Strin g sopClass Name) {
  313                    try{
  314                             increm entInbound ObjectProc essedCount (aet.toUpp erCase(),  manufactur er, model,  sopClassN ame);
  315                             increm entInbound DimseMessa geAcceptCo unt(aet.to UpperCase( ), DicomSe rviceStats .CSTORE);
  316                    }
  317                    catc h(Exceptio n X){
  318                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  319                             }
  320                    }
  321  
  322           
  323           /* *
  324            *  @param ae t
  325            *  @param ma nufacturer
  326            *  @param mo del
  327            *  @param so pClassName
  328            * /
  329           pu blic void  incrementI nboundReje ctCount(St ring aet,  String man ufacturer,  String mo del, Strin g sopClass Name) {
  330                    try{
  331                             increm entInbound ObjectReje ctedCount( aet.toUppe rCase(), m anufacture r, model,  sopClassNa me);
  332                             increm entInbound DimseMessa geRejectCo unt(aet.to UpperCase( ), DicomSe rviceStats .CSTORE);
  333                    }
  334                    catc h(Exceptio n X){
  335                             logger .warn(this .getClass( ).getName( )+" failed  to update  Statistic s.");
  336                             }
  337                    }
  338  
  339  
  340           pu blic void  loadFalseS tatistics( ){
  341                    
  342                    Dico mServiceSt ats.getIns tance().se tCurrentPo rtStatus(1 0, DicomSe rviceStats .UP);
  343                    Dico mServiceSt ats.getIns tance().se tCurrentPo rtStatus(1 1, DicomSe rviceStats .UP);
  344                    Dico mServiceSt ats.getIns tance().se tCurrentPo rtStatus(1 2, DicomSe rviceStats .UP);
  345                    Dico mServiceSt ats.getIns tance().se tCurrentPo rtStatus(1 3, DicomSe rviceStats .DOWN);
  346                    
  347                     DicomServi ceStats.ge tInstance( ).incremen tInboundAs sociationA cceptCount ("Strawber ry", " IP          ");
  348                     DicomServi ceStats.ge tInstance( ).incremen tInboundAs sociationA cceptCount ("ChocoLAT E", " IP          ");
  349                     DicomServi ceStats.ge tInstance( ).incremen tInboundAs sociationA cceptCount ("Vanilla" , " IP          ");
  350                    
  351                     DicomServi ceStats.ge tInstance( ).incremen tInboundAs sociationR ejectCount ("Vanilla" , " IP          ");
  352                     DicomServi ceStats.ge tInstance( ).incremen tInboundAs sociationR ejectCount ("VANILLA" , " IP          ");
  353                     DicomServi ceStats.ge tInstance( ).incremen tInboundAs sociationR ejectCount ("Strawber ry", " IP          ");
  354  
  355                    Dico mServiceSt ats.getIns tance().in crementInb oundDimseM essageAcce ptCount("S trawberry" , CSTORE);
  356                    Dico mServiceSt ats.getIns tance().in crementInb oundDimseM essageAcce ptCount("S trawberry" , CSTORE);
  357                    Dico mServiceSt ats.getIns tance().in crementInb oundDimseM essageReje ctCount("V anilla", C FIND);
  358                    
  359                    Dico mServiceSt ats.getIns tance().in crementInb oundObject ProcessedC ount("Choc olate", "V eterans Af fairs", "P arty Cake" , "Compute d Radiogra phy");
  360                    Dico mServiceSt ats.getIns tance().in crementInb oundObject ProcessedC ount("CHOC OLATE", "V eterans Af fairs", "P arty Cake" , "Compute d Radiogra phy");
  361                    Dico mServiceSt ats.getIns tance().in crementInb oundObject ProcessedC ount("Vani lla", "Vet erans Affa irs", "Roc ky Road",  "Computed  Tomography ");
  362                    Dico mServiceSt ats.getIns tance().in crementInb oundObject ProcessedC ount("Stra wberry", " Veterans A ffairs", " Fudge Ripp le", "Magn etic Reson ance");
  363                    
  364                    Dico mServiceSt ats.getIns tance().in crementInb oundObject RejectedCo unt("STRAW BERRY", "V eterans Af fairs", "F udge Rippl e", "Magne tic Resona nce");
  365                    
  366                    Dico mServiceSt ats.getIns tance().in crementInb oundObject sPassedToL egacyGWCou nt("Vanill a");
  367                    Dico mServiceSt ats.getIns tance().in crementInb oundObject sPassedToL egacyGWCou nt("vanill a");
  368                    Dico mServiceSt ats.getIns tance().in crementInb oundObject sPassedToL egacyGWCou nt("VANILL A");
  369                    Dico mServiceSt ats.getIns tance().in crementInb oundObject sPassedToL egacyGWCou nt("Strawb erry");
  370  
  371                    Dico mServiceSt ats.getIns tance().in crementInb oundObject sPassedToH DIGDataStr uctureCoun t("Vanilla ");
  372                    Dico mServiceSt ats.getIns tance().in crementInb oundObject sPassedToH DIGDataStr uctureCoun t("Vanilla ");
  373                    Dico mServiceSt ats.getIns tance().in crementInb oundObject sPassedToH DIGDataStr uctureCoun t("Chocola te");
  374                    Dico mServiceSt ats.getIns tance().in crementInb oundObject sPassedToH DIGDataStr uctureCoun t("Chocola te");
  375                    Dico mServiceSt ats.getIns tance().in crementInb oundObject sPassedToH DIGDataStr uctureCoun t("Chocola te");
  376                    
  377                    Dico mServiceSt ats.getIns tance().in crementInb oundDuplic ateObjectC ount("Vani lla", "Vet erans Affa irs", "Roc ky Road");
  378                    Dico mServiceSt ats.getIns tance().in crementInb oundDuplic ateObjectC ount("Vani lla", "Vet erans Affa irs", "Roc ky Road");
  379                    Dico mServiceSt ats.getIns tance().in crementInb oundDuplic ateObjectC ount("vani lla", "Vet erans Affa irs", "Roc ky Road");
  380                    Dico mServiceSt ats.getIns tance().in crementInb oundDuplic ateObjectC ount("vani lla", "Vet erans Affa irs", "Roc ky Road");
  381                    Dico mServiceSt ats.getIns tance().in crementInb oundDuplic ateObjectC ount("vani lla", "Vet erans Affa irs", "Fud ge Ripple" );
  382                    
  383                    Dico mServiceSt ats.getIns tance().in crementDup licateInst anceUIDsCo unt("Veter ans Affair s", "Cooki e Dough");
  384                    Dico mServiceSt ats.getIns tance().in crementDup licateInst anceUIDsCo unt("Veter ans Affair s", "Cooki e Dough");
  385                    Dico mServiceSt ats.getIns tance().in crementDup licateInst anceUIDsCo unt("Veter ans Affair s", "Butte r Pecan");
  386                    Dico mServiceSt ats.getIns tance().in crementDup licateInst anceUIDsCo unt("Veter ans Affair s", "Fudge  Ripple");
  387                    Dico mServiceSt ats.getIns tance().in crementDup licateInst anceUIDsCo unt("Veter ans Affair s", "Fudge  Ripple");
  388                    
  389                    Dico mServiceSt ats.getIns tance().in crementIOD ViolationC ount("Vete rans Affai rs", "Neop olitan");
  390                    Dico mServiceSt ats.getIns tance().in crementIOD ViolationC ount("Vete rans Affai rs", "Neop olitan");
  391                    
  392                    Dico mServiceSt ats.getIns tance().in crementOut boundAssoc iationAcce ptCount("C hocolate") ;
  393                    Dico mServiceSt ats.getIns tance().in crementOut boundAssoc iationAcce ptCount("C hocolate") ;
  394                    Dico mServiceSt ats.getIns tance().in crementOut boundAssoc iationReje ctCount("C hocolate") ;
  395                    Dico mServiceSt ats.getIns tance().in crementOut boundAssoc iationAcce ptCount("C hocolate") ;
  396                    
  397                    Dico mServiceSt ats.getIns tance().in crementOut boundObjec tTransmitt edCount("C hocolate") ;
  398                    Dico mServiceSt ats.getIns tance().in crementOut boundObjec tTransmitt edCount("C hocolate") ;
  399                    Dico mServiceSt ats.getIns tance().in crementOut boundObjec tTransmitt edCount("C hocolate") ;
  400                    Dico mServiceSt ats.getIns tance().in crementOut boundObjec tRejectedC ount("Choc olate");
  401                                      
  402                    Dico mServiceSt ats.getIns tance().se tTotalRADO bjectsToCo rrectForHD IG(25);
  403                    Dico mServiceSt ats.getIns tance().se tTotalCONO bjectsToCo rrectForHD IG(50);
  404           }
  405  
  406           
  407           pr otected sy nchronized  Listening PortStatis tics getFr omPortList (int port) {
  408                    List eningPortS tatistics  statEntry;
  409  
  410                    if(c urrentPort sStatus.is Empty()){
  411                             statEn try = new  ListeningP ortStatist ics(port);
  412                             String  objName =  "Port";
  413                             String  objNumber  = Integer .toString( currentPor tsStatus.s ize());
  414                             regist erAddedRes ourceMBean s(objName,  objNumber , statEntr y);
  415                             curren tPortsStat us.add(sta tEntry);
  416                             return  statEntry ;
  417                    }
  418                    Iter ator<Liste ningPortSt atistics>  iter = cur rentPortsS tatus.iter ator();
  419                    whil e(iter.has Next()){
  420                             statEn try = iter .next();
  421                             if((st atEntry!=n ull) && (s tatEntry.g etPort() = = port)){
  422                                      return s tatEntry;
  423                             }
  424                    }
  425                    stat Entry = ne w Listenin gPortStati stics(port );
  426                    Stri ng objName  = "Port";
  427                    Stri ng objNumb er = Integ er.toStrin g(currentP ortsStatus .size());
  428                    regi sterAddedR esourceMBe ans(objNam e, objNumb er, statEn try);
  429                    curr entPortsSt atus.add(s tatEntry);
  430                    retu rn statEnt ry;
  431           }        
  432  
  433           pr otected sy nchronized  InboundDi comAssocia tionStatis tics getFr omInboundA ssociation List(Strin g aet, Str ing ipAddr ){
  434                    Inbo undDicomAs sociationS tatistics  statEntry;
  435                    
  436                    if(a et != null  && aet.le ngth()>0){
  437                             aet =  aet.trim() ;
  438                    }
  439                    if(i pAddr != n ull && ipA ddr.length ()>0){
  440                             ipAddr  = ipAddr. trim();
  441                    }
  442                    
  443                    if(i nboundAsso ciationSta ts.isEmpty ()){
  444                             statEn try = new  InboundDic omAssociat ionStatist ics(aet, i pAddr);
  445                             String  objName =  "InboundA ssociation s";
  446                             String  objNumber  = Integer .toString( inboundAss ociationSt ats.size() );
  447                             regist erAddedRes ourceMBean s(objName,  objNumber , statEntr y);
  448                             inboun dAssociati onStats.ad d(statEntr y);
  449                             return  statEntry ;
  450                    }
  451                    Iter ator<Inbou ndDicomAss ociationSt atistics>  iter = inb oundAssoci ationStats .iterator( );
  452                    whil e(iter.has Next()){
  453                             statEn try = iter .next();
  454                             if((st atEntry!=n ull) 
  455                                               && (statEn try.getAeT itle().equ als(aet))
  456                                               && (statEn try.getIpA ddress().e quals(ipAd dr))){
  457                                      return s tatEntry;
  458                             }
  459                    }
  460                    stat Entry = ne w InboundD icomAssoci ationStati stics(aet,  ipAddr);
  461                    Stri ng objName  = "Inboun dAssociati ons";
  462                    Stri ng objNumb er = Integ er.toStrin g(inboundA ssociation Stats.size ());
  463                    regi sterAddedR esourceMBe ans(objNam e, objNumb er, statEn try);
  464                    inbo undAssocia tionStats. add(statEn try);
  465                    retu rn statEnt ry;
  466           }
  467           
  468           pr otected sy nchronized  InboundDi comDimseSt atistics g etFromDims eList(Stri ng aet, St ring dimse Service){
  469                    Inbo undDicomDi mseStatist ics statEn try;
  470                    
  471                    if(a et != null  && aet.le ngth()>0){
  472                             aet =  aet.trim() ;
  473                    }
  474                    if(d imseServic e != null  && dimseSe rvice.leng th()>0){
  475                             dimseS ervice = d imseServic e.trim();
  476                    }
  477                    
  478                    if(d imseServic eStats.isE mpty()){
  479                             statEn try = new  InboundDic omDimseSta tistics(ae t, dimseSe rvice);
  480                             String  objName =  "InboundD imseMessag es";
  481                             String  objNumber  = Integer .toString( dimseServi ceStats.si ze());
  482                             regist erAddedRes ourceMBean s(objName,  objNumber , statEntr y);
  483                             dimseS erviceStat s.add(stat Entry);
  484                             return  statEntry ;
  485                    }
  486                    Iter ator<Inbou ndDicomDim seStatisti cs> iter =  dimseServ iceStats.i terator();
  487                    whil e(iter.has Next()){
  488                             statEn try = iter .next();
  489                             if((st atEntry!=n ull) 
  490                                               && (statEn try.getAeT itle().equ als(aet))
  491                                               && (statEn try.getDim seServiceN ame().equa ls(dimseSe rvice))){
  492                                      return s tatEntry;
  493                             }
  494                    }
  495                    stat Entry = ne w InboundD icomDimseS tatistics( aet, dimse Service);
  496                    Stri ng objName  = "Inboun dDimseMess ages";
  497                    Stri ng objNumb er = Integ er.toStrin g(dimseSer viceStats. size());
  498                    regi sterAddedR esourceMBe ans(objNam e, objNumb er, statEn try);
  499                    dims eServiceSt ats.add(st atEntry);
  500                    retu rn statEnt ry;
  501           }
  502  
  503           pr otected sy nchronized  InboundDi comObjectS tatistics  getFromSto rageSCPLis t(String a et){
  504                    Inbo undDicomOb jectStatis tics statE ntry;
  505                    
  506                    if(a et != null  && aet.le ngth()>0){
  507                             aet =  aet.trim() ;
  508                    }
  509                    
  510                    if(s torageSCPS tats.isEmp ty()){
  511                             statEn try = new  InboundDic omObjectSt atistics(a et);
  512                             String  objName =  "InboundO bjects";
  513                             String  objNumber  = Integer .toString( storageSCP Stats.size ());
  514                             regist erAddedRes ourceMBean s(objName,  objNumber , statEntr y);
  515                             storag eSCPStats. add(statEn try);
  516                             return  statEntry ;
  517                    }
  518                    Iter ator<Inbou ndDicomObj ectStatist ics> iter  = storageS CPStats.it erator();
  519                    whil e(iter.has Next()){
  520                             statEn try = iter .next();
  521                             if((st atEntry!=n ull) 
  522                                               && (statEn try.getAeT itle().equ als(aet))) {
  523                                      return s tatEntry;
  524                             }
  525                    }
  526                    stat Entry = ne w InboundD icomObject Statistics (aet);
  527                    Stri ng objName  = "Inboun dObjects";
  528                    Stri ng objNumb er = Integ er.toStrin g(storageS CPStats.si ze());
  529                    regi sterAddedR esourceMBe ans(objNam e, objNumb er, statEn try);
  530                    stor ageSCPStat s.add(stat Entry);
  531                    retu rn statEnt ry;
  532           }
  533  
  534           pr otected sy nchronized  InboundMo dalityDevi ceStatisti cs getFrom ModalityDe viceList(S tring manu facturer,  String mod el){
  535                    Inbo undModalit yDeviceSta tistics st atEntry;
  536  
  537                    if(m anufacture r != null  && manufac turer.leng th()>0){
  538                             manufa cturer = m anufacture r.trim();
  539                    }
  540                    if(m odel != nu ll && mode l.length() >0){
  541                             model  = model.tr im();
  542                    }
  543  
  544                    if(d eviceStats .isEmpty() ){
  545                             statEn try = new  InboundMod alityDevic eStatistic s(manufact urer, mode l);
  546                             String  objName =  "InboundM odalityDev ices";
  547                             String  objNumber  = Integer .toString( deviceStat s.size());
  548                             regist erAddedRes ourceMBean s(objName,  objNumber , statEntr y);
  549                             device Stats.add( statEntry) ;
  550                             return  statEntry ;
  551                    }
  552                    Iter ator<Inbou ndModality DeviceStat istics> it er = devic eStats.ite rator();
  553                    whil e(iter.has Next()){
  554                             statEn try = iter .next();
  555                             if((st atEntry!=n ull) 
  556                                               && (statEn try.getMan ufacturer( ).equals(m anufacture r)) 
  557                                               && (statEn try.getMod el().equal s(model))) {
  558                                      return s tatEntry;
  559                             }
  560                    }
  561                    stat Entry = ne w InboundM odalityDev iceStatist ics(manufa cturer, mo del);
  562                    Stri ng objName  = "Inboun dModalityD evices";
  563                    Stri ng objNumb er = Integ er.toStrin g(deviceSt ats.size() );
  564                    regi sterAddedR esourceMBe ans(objNam e, objNumb er, statEn try);
  565                    devi ceStats.ad d(statEntr y);
  566                    retu rn statEnt ry;
  567           }
  568  
  569           pr otected sy nchronized  InboundSO PClassStat istics get FromSOPCla ssList(Str ing sopCla ssUID){
  570                    Inbo undSOPClas sStatistic s statEntr y;
  571  
  572                    if(s opClassUID  != null & & sopClass UID.length ()>0){
  573                             sopCla ssUID = so pClassUID. trim();
  574                    }
  575  
  576                    if(s opClassSta ts.isEmpty ()){
  577                             statEn try = new  InboundSOP ClassStati stics(sopC lassUID);
  578                             String  objName =  "InboundS OPClasses" ;
  579                             String  objNumber  = Integer .toString( sopClassSt ats.size() );
  580                             regist erAddedRes ourceMBean s(objName,  objNumber , statEntr y);
  581                             sopCla ssStats.ad d(statEntr y);
  582                             return  statEntry ;
  583                    }
  584                    Iter ator<Inbou ndSOPClass Statistics > iter = s opClassSta ts.iterato r();
  585                    whil e(iter.has Next()){
  586                             statEn try = iter .next();
  587                             if((st atEntry!=n ull) 
  588                                               && (statEn try.getMod alityCode( ).equals(s opClassUID ))){
  589                                      return s tatEntry;
  590                             }
  591                    }
  592                    stat Entry = ne w InboundS OPClassSta tistics(so pClassUID) ;
  593                    Stri ng objName  = "Inboun dSOPClasse s";
  594                    Stri ng objNumb er = Integ er.toStrin g(sopClass Stats.size ());
  595                    regi sterAddedR esourceMBe ans(objNam e, objNumb er, statEn try);
  596                    sopC lassStats. add(statEn try);
  597                    retu rn statEnt ry;
  598           }
  599  
  600           pr otected sy nchronized  OutboundD icomObject Statistics  getFromSt orageSCULi st(String  aet){
  601                    
  602                    Outb oundDicomO bjectStati stics stat Entry;
  603                    
  604                    if(a et != null  && aet.le ngth()>0){
  605                             aet =  aet.trim() ;
  606                    }
  607                    
  608                    if(s torageSCUS tats.isEmp ty()){
  609                             statEn try = new  OutboundDi comObjectS tatistics( aet);
  610                             String  objName =  "Outbound Objects";
  611                             String  objNumber  = Integer .toString( storageSCU Stats.size ());
  612                             regist erAddedRes ourceMBean s(objName,  objNumber , statEntr y);
  613                             storag eSCUStats. add(statEn try);
  614                             return  statEntry ;
  615                    }
  616                    Iter ator<Outbo undDicomOb jectStatis tics> iter  = storage SCUStats.i terator();
  617                    whil e(iter.has Next()){
  618                             statEn try = iter .next();
  619                             if((st atEntry!=n ull) 
  620                                               && (statEn try.getAeT itle().equ als(aet))) {
  621                                      return s tatEntry;
  622                             }
  623                    }
  624                    stat Entry = ne w Outbound DicomObjec tStatistic s(aet);
  625                    Stri ng objName  = "Outbou ndObjects" ;
  626                    Stri ng objNumb er = Integ er.toStrin g(storageS CUStats.si ze());
  627                    regi sterAddedR esourceMBe ans(objNam e, objNumb er, statEn try);
  628                    stor ageSCUStat s.add(stat Entry);
  629                    retu rn statEnt ry;
  630           }
  631  
  632           pr otected sy nchronized  OutboundD icomAssoci ationStati stics getF romOutboun dAssociati onList(Str ing aet){
  633                    
  634                    Outb oundDicomA ssociation Statistics  statEntry ;
  635                    
  636                    if(a et != null  && aet.le ngth()>0){
  637                             aet =  aet.trim() ;
  638                    }
  639                    
  640                    if(o utboundAss ociationSt ats.isEmpt y()){
  641                             statEn try = new  OutboundDi comAssocia tionStatis tics(aet);
  642                             String  objName =  "Outbound Associatio ns";
  643                             String  objNumber  = Integer .toString( outboundAs sociationS tats.size( ));
  644                             regist erAddedRes ourceMBean s(objName,  objNumber , statEntr y);
  645                             outbou ndAssociat ionStats.a dd(statEnt ry);
  646                             return  statEntry ;
  647                    }
  648                    Iter ator<Outbo undDicomAs sociationS tatistics>  iter = ou tboundAsso ciationSta ts.iterato r();
  649                    whil e(iter.has Next()){
  650                             statEn try = iter .next();
  651                             if((st atEntry!=n ull) 
  652                                               && (statEn try.getAeT itle().equ als(aet))) {
  653                                      return s tatEntry;
  654                             }
  655                    }
  656                    stat Entry = ne w Outbound DicomAssoc iationStat istics(aet );
  657                    Stri ng objName  = "Outbou ndAssociat ions";
  658                    Stri ng objNumb er = Integ er.toStrin g(outbound Associatio nStats.siz e());
  659                    regi sterAddedR esourceMBe ans(objNam e, objNumb er, statEn try);
  660                    outb oundAssoci ationStats .add(statE ntry);
  661                    retu rn statEnt ry;
  662           }
  663  
  664           
  665           /* *
  666            *  This meth od should  only be ca lled once,  else MBea n exceptio ns will oc cur.
  667            * /
  668           pr ivate sync hronized s tatic void  registerR esourceMBe ans()
  669       {
  670                    MBea nServer mB eanServer  = Manageme ntFactory. getPlatfor mMBeanServ er();
  671                    
  672                    if(d icomServic eStatsMBea nName == n ull)
  673                    {
  674                             try
  675                {
  676                                      Hashtabl e<String,  String> mB eanPropert ies = new  Hashtable< String, St ring>();
  677                                      mBeanPro perties.pu t( "type",  "DicomSer viceStats"  );
  678                                      mBeanPro perties.pu t( "name",  "DICOMAct ivity");
  679                                      dicomSer viceStatsM BeanName =  new Objec tName(Imag ingMBean.V IX_MBEAN_D OMAIN_NAME , mBeanPro perties);
  680                         mBeanServe r.register MBean(Dico mServiceSt ats.getIns tance(), d icomServic eStatsMBea nName);
  681                } 
  682                             catch  (Exception  e){ 
  683                                      e.printS tackTrace( );
  684                             }
  685                    }
  686           }
  687           
  688           pr ivate sync hronized s tatic void  registerA ddedResour ceMBeans(S tring objN ame, Strin g number,  Object obj ){
  689  
  690                    MBea nServer mB eanServer  = Manageme ntFactory. getPlatfor mMBeanServ er();
  691                    try
  692           {
  693                             Hashta ble<String , String>  mBeanPrope rties = ne w Hashtabl e<String,  String>();
  694                             mBeanP roperties. put( "type ", "DicomS erviceStat s" );
  695                             mBeanP roperties. put( "name ", objName );
  696                             mBeanP roperties. put("numbe r", number );
  697                             Object Name name  = new Obje ctName(Ima gingMBean. VIX_MBEAN_ DOMAIN_NAM E, mBeanPr operties);
  698                mBeanSer ver.regist erMBean(ob j, name);
  699           } 
  700                    catc h (Excepti on e){ 
  701                             //Do n othing
  702                    }
  703           }
  704  
  705           pu blic void  setDicomCo rrectWorkI temCount(i nt dicomCo rrectWorkI temCount)  {
  706                    this .dicomCorr ectWorkIte mCount = d icomCorrec tWorkItemC ount;
  707           }
  708  
  709           pu blic int g etDicomCor rectWorkIt emCount()  {
  710                    retu rn this.di comCorrect WorkItemCo unt;
  711           }
  712  
  713           pu blic void  setNetwork ImportWork ItemCount( int networ kImportWor kItemCount ) {
  714                    this .networkIm portWorkIt emCount =  networkImp ortWorkIte mCount;
  715           }
  716  
  717           pu blic int g etNetworkI mportWorkI temCount()  {
  718                    retu rn this.ne tworkImpor tWorkItemC ount;
  719           }
  720  
  721           pu blic void  setStagedM ediaWorkIt emCount(in t stagedMe diaWorkIte mCount) {
  722                    this .stagedMed iaWorkItem Count = st agedMediaW orkItemCou nt;
  723           }
  724  
  725           pu blic int g etStagedMe diaWorkIte mCount() {
  726                    retu rn this.st agedMediaW orkItemCou nt;
  727           }
  728  
  729           pu blic void  setFailedW orkItemCou nt(int fai ledWorkIte mCount) {
  730                    this .failedWor kItemCount  = failedW orkItemCou nt;
  731           }
  732  
  733           pu blic int g etFailedWo rkItemCoun t() {
  734                    retu rn failedW orkItemCou nt;
  735           }
  736  
  737           pu blic void  setService AccountVal id(boolean  serviceAc countValid ) {
  738                    this .serviceAc countValid  = service AccountVal id;
  739           }
  740  
  741           pu blic boole an isServi ceAccountV alid() {
  742                    retu rn service AccountVal id;
  743           }
  744   }