public void close() throws IOException, InterruptedException { if (as != null && as.isReadyForDataTransfer()) { as.waitForOutstandingRSP(); as.release(); } }
@Override public DimseRSPHandler createDimseRSPHandler(final File f) { return new DimseRSPHandler(as.nextMessageID()) { @Override public void onDimseRSP(Association as, Attributes cmd, Attributes data) { super.onDimseRSP(as, cmd, data); StoreSCU.this.onCStoreRSP(cmd, f); } }; } };
public DimseRSP cecho() throws IOException, InterruptedException { return cecho(UID.VerificationSOPClass); }
public void close() throws IOException, InterruptedException { if (as != null) { if (as.isReadyForDataTransfer()) as.release(); as.waitForSocketClose(); } }
public void close() throws IOException, InterruptedException { if (as != null) { as.waitForOutstandingRSP(); as.release(); as.waitForSocketClose(); } }
public void close() throws IOException, InterruptedException { if (as != null) { if (as.isReadyForDataTransfer()) { as.waitForOutstandingRSP(); if (keepAlive) waitForOutstandingResults(); as.release(); } as.waitForSocketClose(); } waitForOutstandingResults(); }
try { dimseRSPHandler(as.ncreate(printManagementSOPClass, UID.BasicFilmSessionSOPClass, filmSessionUID, filmSessionAttrs, UID.ImplicitVRLittleEndian)); DimseRSP ncreateFilmBoxRSP = as.ncreate(printManagementSOPClass, UID.BasicFilmBoxSOPClass, filmBoxUID, filmBoxAttrs, UID.ImplicitVRLittleEndian); dimseRSPHandler(ncreateFilmBoxRSP); ncreateFilmBoxRSP.getDataset().getNestedDataset(Tag.ReferencedImageBoxSequence); dimseRSPHandler(as.nset(printManagementSOPClass, imageBoxSOPClass, imageBoxSequence.getString(Tag.ReferencedSOPInstanceUID), imageBoxAttrs, UID.ImplicitVRLittleEndian)); dimseRSPHandler(as.naction(printManagementSOPClass, UID.BasicFilmBoxSOPClass, filmBoxUID, 1, null, UID.ImplicitVRLittleEndian)); as.ndelete(printManagementSOPClass, UID.BasicFilmBoxSOPClass, filmBoxUID); as.ndelete(printManagementSOPClass, UID.BasicFilmSessionSOPClass, filmSessionUID); } finally { if (as != null && as.isReadyForDataTransfer()) { as.waitForOutstandingRSP(); as.release();
public DimseRSP ncreate(String asuid, String cuid, String iuid, Attributes data, String tsuid) throws IOException, InterruptedException { FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID()); ncreate(asuid, cuid, iuid, data, tsuid, rsp); return rsp; }
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++; } }
public DimseRSP cstore(String cuid, String iuid, int priority, DataWriter data, String tsuid) throws IOException, InterruptedException { FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID()); cstore(cuid, iuid, priority, data, tsuid, rsp); return rsp; }
private void retrieve(Attributes keys) throws IOException, InterruptedException { DimseRSPHandler rspHandler = new DimseRSPHandler(as.nextMessageID()) { @Override public void onDimseRSP(Association as, Attributes cmd, Attributes data) { super.onDimseRSP(as, cmd, data); } }; as.cmove(model.cuid, priority, keys, null, destination, rspHandler); }
public DimseRSP naction(String asuid, String cuid, String iuid, int actionTypeId, Attributes data, String tsuid) throws IOException, InterruptedException { FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID()); naction(asuid, cuid, iuid, actionTypeId, data, tsuid, rsp); return rsp; }
protected void releaseStoreAssociation(Association storeas) { try { storeas.release(); } catch (IOException e) { LOG.warn("{}: failed to release association to {}", rqas, storeas.getRemoteAET(), e); } }
@Override public void run() { if (sameAssoc) { try { neventReport(as); return; } catch (Exception e) { DcmQRSCP.LOG.info( "Failed to return Storage Commitment Result in same Association:", e); } } try { Association diffAssoc = as.getApplicationEntity().connect( as.getConnection(), remoteConn, makeAAssociateRQ()); neventReport(diffAssoc); diffAssoc.release(); } catch (Exception e) { DcmQRSCP.LOG.error( "Failed to return Storage Commitment Result in new Association:", e); } }
public void sendFiles() throws IOException { BufferedReader fileInfos = new BufferedReader(new InputStreamReader( new FileInputStream(tmpFile))); try { String line; while (as.isReadyForDataTransfer() && (line = fileInfos.readLine()) != null) { String[] ss = StringUtils.split(line, '\t'); try { send(new File(ss[4]), Long.parseLong(ss[3]), ss[1], ss[0], ss[2]); } catch (Exception e) { e.printStackTrace(); } } try { as.waitForOutstandingRSP(); } catch (InterruptedException e) { e.printStackTrace(); } } finally { SafeClose.close(fileInfos); } }
public DimseRSP nset(String asuid, String cuid, String iuid, DataWriter data, String tsuid) throws IOException, InterruptedException { FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID()); nset(asuid, cuid, iuid, data, tsuid, rsp); return rsp; }
public DimseRSP cecho(String cuid) throws IOException, InterruptedException { FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID()); PresentationContext pc = pcFor(cuid, null); checkIsSCU(cuid); Attributes cechorq = Commands.mkCEchoRQ(rsp.getMessageID(), cuid); invoke(pc, cechorq, null, rsp, conn.getResponseTimeout()); return rsp; }
public void close() throws IOException, InterruptedException { if (as != null) { as.release(); } }
public DimseRSP neventReport(String asuid, String cuid, String iuid, int eventTypeId, Attributes data, String tsuid) throws IOException, InterruptedException { FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID()); neventReport(asuid, cuid, iuid, eventTypeId, data, tsuid, rsp); return rsp; }
public DimseRSP cget(String cuid, int priority, Attributes data, String tsuid) throws IOException, InterruptedException { FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID()); cget(cuid, priority, data, tsuid, rsp); return rsp; }