return resSet;
}
ExternalResourceDescriptor extractExternalResourceDescriptor(Frame frame) {
Operation op = (frame == null) ? null : frame.getOperation();
OperationMap requestDetails = (op == null) ? null : op.get("request", OperationMap.class);
String uriValue = (requestDetails == null) ? null : requestDetails.get(OperationFields.URI, String.class);
if (StringUtil.getSafeLength(uriValue) <= 0) {
return null;
}
try {
URI uri = new URI(uriValue);
String host = uri.getHost();
int port = resolvePort(uri);
String color = colorManager.getColor(op);
String app = null;
String ser = null;
String ep = null;
OperationMap responseDetails = (op == null) ? null : op.get("response", OperationMap.class);
if (responseDetails != null) {
OperationList headersList = responseDetails.get("headers", OperationList.class);
if (headersList != null) {
for (int i = 0; i < headersList.size(); i++) {
OperationMap map = headersList.get(i, OperationMap.class);
String headerName = map.get(OperationUtils.NAME_KEY, String.class);
String headerValue = map.get(OperationUtils.VALUE_KEY, String.class);
if ((app != null) && EndPointAnalyzersRegistry.APP_TOKEN_NAME.equals(headerName)) {
app = headerValue;
} else if ((ser != null) && EndPointAnalyzersRegistry.SERVER_TOKEN_NAME.equals(headerName)) {
ser = headerValue;