/** * Initializes Association related parameters. * * @param cfg the configuration properties for this class. * @param url the DcmURL of the communication partner. */ private final void initAssocParam(ConfigProperties cfg, DcmURL url) { String callingAET = null; // >>>> Get data for filling the Association object for establishing an // >>>> active association from configuration file acTimeout = Integer.parseInt(cfg.getProperty("ac-timeout", "5000")); dimseTimeout = Integer.parseInt(cfg.getProperty("dimse-timeout", "0")); soCloseDelay = Integer.parseInt(cfg.getProperty("so-close-delay", "500")); // >>>> Fill the Association Request package (A-ASSOCIATE-RQ) // Identifying the communication partner by an AET (Application Entity Title) assocRQ.setCalledAET(url.getCalledAET()); // Identifying ourselves by an AET (Application Entity Title) if (url.getCallingAET() != null) { callingAET = url.getCallingAET(); } else { callingAET = DEFAULT_CALLING_AET; } assocRQ.setCallingAET(callingAET); // Maximum size of one PDU (Protocol Data Unit) assocRQ.setMaxPDULength(Integer.parseInt(cfg.getProperty("max-pdu-len", "16352"))); // Defines possibilities for asynchron DIMSE communication. Noramly synchron DIMSE communication // is used. // API doc: AssociationFactory.newAsyncOpsWindow(int maxOpsInvoked, int maxOpsPerfomed) // PS 3.7 - Annex D.3.3.3 ASYNCHRONOUS OPERATIONS WINDOW NEGOTIATION // maxOpsInvoked: This field shall contain the Maximum-number-operationsinvoked as defined for // the Association-requester // maxOpsPerfomed: This field shall contain the Maximum-number-operationsperformed as defined // for the Association-requester assocRQ.setAsyncOpsWindow( aFact.newAsyncOpsWindow(Integer.parseInt(cfg.getProperty("max-op-invoked", "0")), 1)); for (Enumeration it = cfg.keys(); it.hasMoreElements(); ) { String key = (String) it.nextElement(); // Setup available transfer syntaces for storage SOP classes // PS 3.4 - Annex B STORAGE SERVICE CLASS // PS 3.4 - B.5 STANDARD SOP CLASSES if (key.startsWith("pc.")) { initPresContext( Integer.parseInt(key.substring(3)), cfg.tokenize(cfg.getProperty(key), new LinkedList())); } } }