private void waitForOutstandingCStoreRSP(Association storeas) { try { synchronized (outstandingRSPLock) { while (outstandingRSP > 0) outstandingRSPLock.wait(); } } catch (InterruptedException e) { LOG.warn("{}: failed to wait for outstanding RSP on association to {}", rqas, storeas.getRemoteAET(), e); } }
private void waitForOutstandingCStoreRSP(Association storeas) { try { synchronized (outstandingRSPLock) { while (outstandingRSP > 0) outstandingRSPLock.wait(); } } catch (InterruptedException e) { LOG.warn("{}: failed to wait for outstanding RSP on association to {}", rqas, storeas.getRemoteAET(), e); } }
protected void releaseStoreAssociation(Association storeas) { try { storeas.release(); } catch (IOException e) { LOG.warn("{}: failed to release association to {}", rqas, storeas.getRemoteAET(), e); } }
protected void releaseStoreAssociation(Association storeas) { try { storeas.release(); } catch (IOException e) { LOG.warn("{}: failed to release association to {}", rqas, storeas.getRemoteAET(), e); } }
@Override public synchronized void onClose(Association as) { super.onClose(as); if (!finished) { ex = as.getException(); if (ex == null) ex = new IOException("Association to " + as.getRemoteAET() + " released before receive of outstanding DIMSE RSP"); notifyAll(); } }
@Override public synchronized void onClose(Association as) { super.onClose(as); if (!finished) { ex = as.getException(); if (ex == null) ex = new IOException("Association to " + as.getRemoteAET() + " released before receive of outstanding DIMSE RSP"); notifyAll(); } }
private void writeRSP(Attributes cmd, Attributes data) { try { rqas.writeDimseRSP(pc, cmd, data); } catch (IOException e) { pendingRSP = false; stopWritePendingRSP(); LOG.warn("{}: Unable to send C-GET or C-MOVE RSP on association to {}", rqas, rqas.getRemoteAET(), e); } }
private void writeRSP(Attributes cmd, Attributes data) { try { rqas.writeDimseRSP(pc, cmd, data); } catch (IOException e) { pendingRSP = false; stopWritePendingRSP(); LOG.warn("{}: Unable to send C-GET or C-MOVE RSP on association to {}", rqas, rqas.getRemoteAET(), e); } }
public boolean isAssociationFromDestinationAET(Association asAccepted) { ProxyAEExtension pae = (ProxyAEExtension) asAccepted.getApplicationEntity().getAEExtension( ProxyAEExtension.class); for (ForwardRule rule : pae.getForwardRules()) for (String destinationAET : rule.getDestinationAETitles()) if (asAccepted.getRemoteAET().equals(destinationAET)) return true; return false; }
LOG.info("{}: Unable to retrieve {}/{} to {}", rqas, UID.nameOf(inst.cuid), UID.nameOf(inst.tsuid), storeas.getRemoteAET(), e); failed.add(inst); continue; status = Status.UnableToPerformSubOperations; LOG.warn("{}: Unable to perform sub-operation on association to {}", rqas, storeas.getRemoteAET(), e); failed.add(inst); while (iter.hasNext())
LOG.info("{}: Unable to retrieve {}/{} to {}", rqas, UID.nameOf(inst.cuid), UID.nameOf(inst.tsuid), storeas.getRemoteAET(), e); failed.add(inst); continue; status = Status.UnableToPerformSubOperations; LOG.warn("{}: Unable to perform sub-operation on association to {}", rqas, storeas.getRemoteAET(), e); failed.add(inst); while (iter.hasNext())
protected void cstore(Association storeas, T inst, String tsuid, DataWriter dataWriter) throws IOException, InterruptedException { DimseRSPHandler rspHandler = new CStoreRSPHandler(storeas.nextMessageID(), inst); if (isCMove()) storeas.cstore(inst.cuid, inst.iuid, priority, rqas.getRemoteAET(), msgId, dataWriter, tsuid, rspHandler); else storeas.cstore(inst.cuid, inst.iuid, priority, dataWriter, tsuid, rspHandler); synchronized (outstandingRSPLock) { outstandingRSP++; } }
t2 = System.currentTimeMillis(); System.out.println(MessageFormat.format( rb.getString("connected"), main.as.getRemoteAET(), t2 - t1)); if (echo)
protected void cstore(Association storeas, T inst, String tsuid, DataWriter dataWriter) throws IOException, InterruptedException { DimseRSPHandler rspHandler = new CStoreRSPHandler(storeas.nextMessageID(), inst); if (isCMove()) storeas.cstore(inst.cuid, inst.iuid, priority, rqas.getRemoteAET(), msgId, dataWriter, tsuid, rspHandler); else storeas.cstore(inst.cuid, inst.iuid, priority, dataWriter, tsuid, rspHandler); synchronized (outstandingRSPLock) { outstandingRSP++; } }
t2 = System.currentTimeMillis(); System.out.println(MessageFormat.format( rb.getString("connected"), main.as.getRemoteAET(), t2 - t1)); if (echo)
public Attributes createFileMetaInformation(String iuid, String cuid, String tsuid) { Attributes fmi = new Attributes(7); fmi.setBytes(Tag.FileMetaInformationVersion, VR.OB, new byte[] { 0, 1 }); fmi.setString(Tag.MediaStorageSOPClassUID, VR.UI, cuid); fmi.setString(Tag.MediaStorageSOPInstanceUID, VR.UI, iuid); fmi.setString(Tag.TransferSyntaxUID, VR.UI, tsuid); fmi.setString(Tag.ImplementationClassUID, VR.UI, getRemoteImplClassUID()); String versionName = getRemoteImplVersionName(); if (versionName != null) fmi.setString(Tag.ImplementationVersionName, VR.SH, versionName); fmi.setString(Tag.SourceApplicationEntityTitle, VR.AE, getRemoteAET()); return fmi; }
public Attributes createFileMetaInformation(String iuid, String cuid, String tsuid) { Attributes fmi = new Attributes(7); fmi.setBytes(Tag.FileMetaInformationVersion, VR.OB, new byte[] { 0, 1 }); fmi.setString(Tag.MediaStorageSOPClassUID, VR.UI, cuid); fmi.setString(Tag.MediaStorageSOPInstanceUID, VR.UI, iuid); fmi.setString(Tag.TransferSyntaxUID, VR.UI, tsuid); fmi.setString(Tag.ImplementationClassUID, VR.UI, getRemoteImplClassUID()); String versionName = getRemoteImplVersionName(); if (versionName != null) fmi.setString(Tag.ImplementationVersionName, VR.SH, versionName); fmi.setString(Tag.SourceApplicationEntityTitle, VR.AE, getRemoteAET()); return fmi; }
private AAssociateRQ makeAAssociateRQ() { AAssociateRQ aarq = new AAssociateRQ(); aarq.setCallingAET(as.getLocalAET()); aarq.setCalledAET(as.getRemoteAET()); ApplicationEntity ae = as.getApplicationEntity(); TransferCapability tc = ae.getTransferCapabilityFor( UID.StorageCommitmentPushModelSOPClass, TransferCapability.Role.SCP); aarq.addPresentationContext( new PresentationContext( 1, UID.StorageCommitmentPushModelSOPClass, tc.getTransferSyntaxes())); aarq.addRoleSelection( new RoleSelection(UID.StorageCommitmentPushModelSOPClass, false, true)); return aarq; }
private AAssociateRQ makeAAssociateRQ() { AAssociateRQ aarq = new AAssociateRQ(); aarq.setCallingAET(as.getLocalAET()); aarq.setCalledAET(as.getRemoteAET()); ApplicationEntity ae = as.getApplicationEntity(); TransferCapability tc = ae.getTransferCapabilityFor( UID.StorageCommitmentPushModelSOPClass, TransferCapability.Role.SCP); aarq.addPresentationContext( new PresentationContext( 1, UID.StorageCommitmentPushModelSOPClass, tc.getTransferSyntaxes())); aarq.addRoleSelection( new RoleSelection(UID.StorageCommitmentPushModelSOPClass, false, true)); return aarq; }