Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | 41x 41x 41x 41x 41x 41x 1162x 1162x 1162x 1162x 1162x 1162x 1162x 1162x 1162x 41x 41x 190x 190x 190x 190x 487x 487x 487x 487x 487x 190x 190x 190x 190x 190x 241x 241x 241x 241x 241x 237x 237x 241x 241x 233x 3x 3x 230x 241x 1x 1x 1x 1x 1x 241x 180x 180x 190x 2x 2x 190x 41x 41x 41x 41x 41x 2128x 2128x 2128x 41x 41x 41x | // Copyright (c) ZeroC, Inc.
import { ParseException } from "./LocalExceptions.js";
export class EndpointI {
toString() {
//
// WARNING: Certain features, such as proxy validation in Glacier2,
// depend on the format of proxy strings. Changes to toString() and
// methods called to generate parts of the reference string could break
// these features. Please review for all features that depend on the
// format of proxyToString() before changing this and related code.
//
return this.protocol() + this.options();
}
initWithOptions(args) {
const unknown = [];
let str = "'" + this.protocol();
for (let i = 0; i < args.length; ++i) {
if (args[i].search(/[ \t\n\r]+/) !== -1) {
str += ' "' + args[i] + '"';
} else {
str += " " + args[i];
}
}
str += "'";
let knownOptions = new Set();
for (let i = 0; i < args.length; ) {
const option = args[i++];
if (option.length < 2 || option.charAt(0) != "-") {
unknown.push(option);
continue;
}
let argument = null;
if (i < args.length && args[i].charAt(0) != "-") {
argument = args[i++];
}
if (this.checkOption(option, argument, str)) {
if (knownOptions.has(option)) {
throw new ParseException(`duplicate option '${option}' in endpoint ${str}`);
}
knownOptions.add(option);
} else {
unknown.push(option);
if (argument !== null) {
unknown.push(argument);
}
}
}
args.length = 0;
for (let i = 0; i < unknown.length; i++) {
args.push(unknown[i]);
}
}
//
// Compare endpoints for sorting purposes
//
equals(p) {
if (!(p instanceof EndpointI)) {
return false;
}
return this.compareTo(p) === 0;
}
checkOption() {
return false;
}
}
|