本文整理了Java中org.dcm4che3.net.Association.getApplicationEntity()
方法的一些代码示例,展示了Association.getApplicationEntity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Association.getApplicationEntity()
方法的具体详情如下:
包路径:org.dcm4che3.net.Association
类名称:Association
方法名:getApplicationEntity
暂无
代码示例来源:origin: dcm4che/dcm4che
protected void onClose(Association as) {
DimseRQHandler tmp = as.getApplicationEntity().getDimseRQHandler();
if (tmp != null)
tmp.onClose(as);
}
代码示例来源:origin: dcm4che/dcm4che
private void startWritePendingRSP() {
writePendingRSP = rqas.getApplicationEntity().getDevice()
.scheduleAtFixedRate(
new Runnable(){
@Override
public void run() {
BasicRetrieveTask.this.writePendingRSP();
}
},
0, pendingRSPInterval, TimeUnit.SECONDS);
}
代码示例来源:origin: org.dcm4che/dcm4che-net
protected void onClose(Association as) {
DimseRQHandler tmp = as.getApplicationEntity().getDimseRQHandler();
if (tmp != null)
tmp.onClose(as);
}
代码示例来源:origin: org.dcm4che/dcm4che-net
private void startWritePendingRSP() {
writePendingRSP = rqas.getApplicationEntity().getDevice()
.scheduleAtFixedRate(
new Runnable(){
@Override
public void run() {
BasicRetrieveTask.this.writePendingRSP();
}
},
0, pendingRSPInterval, TimeUnit.SECONDS);
}
代码示例来源:origin: dcm4che/dcm4che
private Association openStoreAssociation(Association as,
Connection remote, AAssociateRQ aarq) throws DicomServiceException {
try {
return as.getApplicationEntity().connect(
as.getConnection(), remote, aarq);
} catch (Exception e) {
throw new DicomServiceException(Status.UnableToPerformSubOperations, e);
}
}
代码示例来源:origin: org.dcm4che.tool/dcm4che-tool-dcmqrscp
private Association openStoreAssociation(Association as,
Connection remote, AAssociateRQ aarq) throws DicomServiceException {
try {
return as.getApplicationEntity().connect(
as.getConnection(), remote, aarq);
} catch (Exception e) {
throw new DicomServiceException(Status.UnableToPerformSubOperations, e);
}
}
代码示例来源:origin: org.dcm4che.dcm4chee-proxy/dcm4chee-proxy-conf
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;
}
代码示例来源:origin: org.dcm4che/dcm4che-net
@Override
public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse,
Attributes rq, Attributes keys) throws IOException {
if (dimse != Dimse.C_FIND_RQ)
throw new DicomServiceException(Status.UnrecognizedOperation);
QueryTask queryTask = calculateMatches(as, pc, rq, keys);
as.getApplicationEntity().getDevice().execute(queryTask);
}
代码示例来源:origin: dcm4che/dcm4che
@Override
public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse,
Attributes rq, Attributes keys) throws IOException {
if (dimse != Dimse.C_FIND_RQ)
throw new DicomServiceException(Status.UnrecognizedOperation);
QueryTask queryTask = calculateMatches(as, pc, rq, keys);
as.getApplicationEntity().getDevice().execute(queryTask);
}
代码示例来源:origin: dcm4che/dcm4che
@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);
}
}
代码示例来源:origin: org.dcm4che.tool/dcm4che-tool-dcmqrscp
@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);
}
}
代码示例来源:origin: dcm4che/dcm4che
@Override
public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse,
Attributes cmd, Attributes keys) throws IOException {
if (dimse != Dimse.C_MOVE_RQ)
throw new DicomServiceException(Status.UnrecognizedOperation);
RetrieveTask retrieveTask = calculateMatches(as, pc, cmd, keys);
if (retrieveTask != null)
as.getApplicationEntity().getDevice().execute(retrieveTask);
else
as.tryWriteDimseRSP(pc, Commands.mkCMoveRSP(cmd, Status.Success));
}
代码示例来源:origin: dcm4che/dcm4che
@Override
public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse,
Attributes cmd, Attributes keys) throws IOException {
if (dimse != Dimse.C_GET_RQ)
throw new DicomServiceException(Status.UnrecognizedOperation);
RetrieveTask retrieveTask = calculateMatches(as, pc, cmd, keys);
if (retrieveTask != null)
as.getApplicationEntity().getDevice().execute(retrieveTask);
else
as.tryWriteDimseRSP(pc, Commands.mkCGetRSP(cmd, Status.Success));
}
代码示例来源:origin: org.dcm4che/dcm4che-net
@Override
public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse,
Attributes cmd, Attributes keys) throws IOException {
if (dimse != Dimse.C_MOVE_RQ)
throw new DicomServiceException(Status.UnrecognizedOperation);
RetrieveTask retrieveTask = calculateMatches(as, pc, cmd, keys);
if (retrieveTask != null)
as.getApplicationEntity().getDevice().execute(retrieveTask);
else
as.tryWriteDimseRSP(pc, Commands.mkCMoveRSP(cmd, Status.Success));
}
代码示例来源:origin: org.dcm4che/dcm4che-net
@Override
public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse,
Attributes cmd, Attributes keys) throws IOException {
if (dimse != Dimse.C_GET_RQ)
throw new DicomServiceException(Status.UnrecognizedOperation);
RetrieveTask retrieveTask = calculateMatches(as, pc, cmd, keys);
if (retrieveTask != null)
as.getApplicationEntity().getDevice().execute(retrieveTask);
else
as.tryWriteDimseRSP(pc, Commands.mkCGetRSP(cmd, Status.Success));
}
代码示例来源:origin: org.dcm4che.tool/dcm4che-tool-dcmqrscp
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;
}
代码示例来源:origin: dcm4che/dcm4che
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;
}
代码示例来源:origin: org.dcm4che/dcm4che-net
protected AAssociateAC negotiate(Association as, AAssociateRQ rq)
throws IOException {
if ((rq.getProtocolVersion() & 1) == 0)
throw new AAssociateRJ(AAssociateRJ.RESULT_REJECTED_PERMANENT,
AAssociateRJ.SOURCE_SERVICE_PROVIDER_ACSE,
AAssociateRJ.REASON_PROTOCOL_VERSION_NOT_SUPPORTED);
if (!rq.getApplicationContext().equals(
UID.DICOMApplicationContextName))
throw new AAssociateRJ(AAssociateRJ.RESULT_REJECTED_PERMANENT,
AAssociateRJ.SOURCE_SERVICE_USER,
AAssociateRJ.REASON_APP_CTX_NAME_NOT_SUPPORTED);
ApplicationEntity ae = as.getApplicationEntity();
if (ae == null || !ae.getConnections().contains(as.getConnection())
|| !ae.isInstalled() || !ae.isAssociationAcceptor())
throw new AAssociateRJ(AAssociateRJ.RESULT_REJECTED_PERMANENT,
AAssociateRJ.SOURCE_SERVICE_USER,
AAssociateRJ.REASON_CALLED_AET_NOT_RECOGNIZED);
if (!ae.isAcceptedCallingAETitle(rq.getCallingAET()))
throw new AAssociateRJ(AAssociateRJ.RESULT_REJECTED_PERMANENT,
AAssociateRJ.SOURCE_SERVICE_USER,
AAssociateRJ.REASON_CALLING_AET_NOT_RECOGNIZED);
UserIdentityAC userIdentity = getUserIdNegotiator() != null
? getUserIdNegotiator().negotiate(as, rq.getUserIdentityRQ())
: null;
if (ae.getDevice().isLimitOfAssociationsExceeded(rq))
throw new AAssociateRJ(AAssociateRJ.RESULT_REJECTED_TRANSIENT,
AAssociateRJ.SOURCE_SERVICE_PROVIDER_PRES,
AAssociateRJ.REASON_LOCAL_LIMIT_EXCEEDED);
return makeAAssociateAC(as, rq, userIdentity);
}
代码示例来源:origin: dcm4che/dcm4che
protected AAssociateAC makeAAssociateAC(Association as, AAssociateRQ rq,
UserIdentityAC userIdentity) throws IOException {
AAssociateAC ac = new AAssociateAC();
ac.setCalledAET(rq.getCalledAET());
ac.setCallingAET(rq.getCallingAET());
Connection conn = as.getConnection();
ac.setMaxPDULength(conn.getReceivePDULength());
ac.setMaxOpsInvoked(Association.minZeroAsMax(rq.getMaxOpsInvoked(),
conn.getMaxOpsPerformed()));
ac.setMaxOpsPerformed(Association.minZeroAsMax(rq.getMaxOpsPerformed(),
conn.getMaxOpsInvoked()));
ac.setUserIdentityAC(userIdentity);
ApplicationEntity ae = as.getApplicationEntity();
for (PresentationContext rqpc : rq.getPresentationContexts())
ac.addPresentationContext(ae.negotiate(rq, ac, rqpc));
return ac;
}
代码示例来源:origin: org.dcm4che/dcm4che-net
protected AAssociateAC makeAAssociateAC(Association as, AAssociateRQ rq,
UserIdentityAC userIdentity) throws IOException {
AAssociateAC ac = new AAssociateAC();
ac.setCalledAET(rq.getCalledAET());
ac.setCallingAET(rq.getCallingAET());
Connection conn = as.getConnection();
ac.setMaxPDULength(conn.getReceivePDULength());
ac.setMaxOpsInvoked(Association.minZeroAsMax(rq.getMaxOpsInvoked(),
conn.getMaxOpsPerformed()));
ac.setMaxOpsPerformed(Association.minZeroAsMax(rq.getMaxOpsPerformed(),
conn.getMaxOpsInvoked()));
ac.setUserIdentityAC(userIdentity);
ApplicationEntity ae = as.getApplicationEntity();
for (PresentationContext rqpc : rq.getPresentationContexts())
ac.addPresentationContext(ae.negotiate(rq, ac, rqpc));
return ac;
}
内容来源于网络,如有侵权,请联系作者删除!