本文整理了Java中org.dcm4che3.net.Association.getConnection()
方法的一些代码示例,展示了Association.getConnection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Association.getConnection()
方法的具体详情如下:
包路径:org.dcm4che3.net.Association
类名称:Association
方法名:getConnection
暂无
代码示例来源: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: 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: 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 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: 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;
}
代码示例来源: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;
}
内容来源于网络,如有侵权,请联系作者删除!