protected PresentationContext negotiate(AAssociateRQ rq, AAssociateAC ac, PresentationContext rqpc) { String as = rqpc.getAbstractSyntax(); TransferCapability tc = roleSelection(rq, ac, as); int pcid = rqpc.getPCID(); if (tc == null) return new PresentationContext(pcid, PresentationContext.ABSTRACT_SYNTAX_NOT_SUPPORTED, rqpc.getTransferSyntax()); String ts = tc.selectTransferSyntax(rqpc.getTransferSyntaxes()); if (ts == null) return new PresentationContext(pcid, PresentationContext.TRANSFER_SYNTAX_NOT_SUPPORTED, rqpc.getTransferSyntax()); byte[] info = negotiate(rq.getExtNegotiationFor(as), tc); if (info != null) ac.addExtendedNegotiation(new ExtendedNegotiation(as, info)); return new PresentationContext(pcid, PresentationContext.ACCEPTANCE, ts); }
protected PresentationContext negotiate(AAssociateRQ rq, AAssociateAC ac, PresentationContext rqpc) { String as = rqpc.getAbstractSyntax(); TransferCapability tc = roleSelection(rq, ac, as); int pcid = rqpc.getPCID(); if (tc == null) return new PresentationContext(pcid, PresentationContext.ABSTRACT_SYNTAX_NOT_SUPPORTED, rqpc.getTransferSyntax()); String ts = tc.selectTransferSyntax(rqpc.getTransferSyntaxes()); if (ts == null) return new PresentationContext(pcid, PresentationContext.TRANSFER_SYNTAX_NOT_SUPPORTED, rqpc.getTransferSyntax()); byte[] info = negotiate(rq.getExtNegotiationFor(as), tc); if (info != null) ac.addExtendedNegotiation(new ExtendedNegotiation(as, info)); return new PresentationContext(pcid, PresentationContext.ACCEPTANCE, ts); }