void onAAbort(AAbort aa) { LOG.info("{} >> {}", name, aa); stopTimeout(); ex = aa; closeSocket(); }
void onAReleaseRQ() throws IOException { LOG.info("{} >> A-RELEASE-RQ", name); stopTimeout(); state.onAReleaseRQ(this); }
void onAAssociateAC(AAssociateAC ac) throws IOException { LOG.info("{} >> A-ASSOCIATE-AC", name); LOG.debug("{}", ac); stopTimeout(); state.onAAssociateAC(this, ac); }
void onAReleaseRP() throws IOException { LOG.info("{} >> A-RELEASE-RP", name); stopTimeout(); state.onAReleaseRP(this); }
void onAReleaseRQ() throws IOException { LOG.info("{} >> A-RELEASE-RQ", name); stopTimeout(); state.onAReleaseRQ(this); }
void onAAssociateAC(AAssociateAC ac) throws IOException { LOG.info("{} >> A-ASSOCIATE-AC", name); LOG.debug("{}", ac); stopTimeout(); state.onAAssociateAC(this, ac); }
void onAReleaseRP() throws IOException { LOG.info("{} >> A-RELEASE-RP", name); stopTimeout(); state.onAReleaseRP(this); }
void onAAbort(AAbort aa) { LOG.info("{} >> {}", name, aa); stopTimeout(); ex = aa; closeSocket(); }
private void startTimeout(String startMsg, String expiredMsg, String cancelMsg, int timeout, State state) { if (timeout > 0 && performing == 0 && rspHandlerForMsgId.isEmpty()) { synchronized (this) { if (this.state == state) { stopTimeout(); this.timeout = Timeout.start(this, startMsg, expiredMsg, cancelMsg, timeout); } } } }
private void startTimeout(String startMsg, String expiredMsg, String cancelMsg, int timeout, State state) { if (timeout > 0 && performing == 0 && rspHandlerForMsgId.isEmpty()) { synchronized (this) { if (this.state == state) { stopTimeout(); this.timeout = Timeout.start(this, startMsg, expiredMsg, cancelMsg, timeout); } } } }
void writeAReleaseRQ() throws IOException { LOG.info("{} << A-RELEASE-RQ", name); enterState(State.Sta7); stopTimeout(); encoder.writeAReleaseRQ(); startReleaseTimeout(); }
void onAAssociateRQ(AAssociateRQ rq) throws IOException { name = rq.getCalledAET() + delim() + rq.getCallingAET() + '(' + serialNo + ')'; LOG.info("{} >> A-ASSOCIATE-RQ", name); LOG.debug("{}", rq); stopTimeout(); state.onAAssociateRQ(this, rq); }
void writeAReleaseRQ() throws IOException { LOG.info("{} << A-RELEASE-RQ", name); enterState(State.Sta7); stopTimeout(); encoder.writeAReleaseRQ(); startReleaseTimeout(); }
void onAAssociateRQ(AAssociateRQ rq) throws IOException { name = rq.getCalledAET() + delim() + rq.getCallingAET() + '(' + serialNo + ')'; LOG.info("{} >> A-ASSOCIATE-RQ", name); LOG.debug("{}", rq); stopTimeout(); state.onAAssociateRQ(this, rq); }
void onDimseRQ(PresentationContext pc, Dimse dimse, Attributes cmd, PDVInputStream data) throws IOException { stopTimeout(); incPerforming(); incReceivedCount(dimse); ae.onDimseRQ(this, pc, dimse, cmd, data); }
void onDimseRQ(PresentationContext pc, Dimse dimse, Attributes cmd, PDVInputStream data) throws IOException { stopTimeout(); incPerforming(); incReceivedCount(dimse); ae.onDimseRQ(this, pc, dimse, cmd, data); }
private void onClose() { stopTimeout(); synchronized (rspHandlerForMsgId) { IntHashMap.Visitor<DimseRSPHandler> visitor = new IntHashMap.Visitor<DimseRSPHandler>() { @Override public boolean visit(int key, DimseRSPHandler value) { value.onClose(Association.this); return true; } }; rspHandlerForMsgId.accept(visitor); rspHandlerForMsgId.clear(); rspHandlerForMsgId.notifyAll(); } if (ae != null) ae.getDevice().getAssociationHandler().onClose(this); for (AssociationListener listener : listeners) listener.onClose(this); }
private void onClose() { stopTimeout(); synchronized (rspHandlerForMsgId) { IntHashMap.Visitor<DimseRSPHandler> visitor = new IntHashMap.Visitor<DimseRSPHandler>() { @Override public boolean visit(int key, DimseRSPHandler value) { value.onClose(Association.this); return true; } }; rspHandlerForMsgId.accept(visitor); rspHandlerForMsgId.clear(); rspHandlerForMsgId.notifyAll(); } if (ae != null) ae.getDevice().getAssociationHandler().onClose(this); for (AssociationListener listener : listeners) listener.onClose(this); }
public void invoke(PresentationContext pc, Attributes cmd, DataWriter data, DimseRSPHandler rspHandler, int rspTimeout, boolean stopOnPending) throws IOException, InterruptedException { stopTimeout(); checkException(); rspHandler.setPC(pc); addDimseRSPHandler(rspHandler); encoder.writeDIMSE(pc, cmd, data); startTimeout(rspHandler.getMessageID(), rspTimeout, stopOnPending); }
public void invoke(PresentationContext pc, Attributes cmd, DataWriter data, DimseRSPHandler rspHandler, int rspTimeout, boolean stopOnPending) throws IOException, InterruptedException { stopTimeout(); checkException(); rspHandler.setPC(pc); addDimseRSPHandler(rspHandler); encoder.writeDIMSE(pc, cmd, data); startTimeout(rspHandler.getMessageID(), rspTimeout, stopOnPending); }