All files / src/Ice ProtocolInstance.js

82.75% Statements 48/58
100% Branches 8/8
58.33% Functions 7/12
82.75% Lines 48/58

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 5941x 41x 41x 41x 268x 268x 268x 268x 268x 268x 268x 268x 268x 41x 41x     41x 41x     41x 41x 321x 321x 41x 41x 4334x 4334x 41x 41x 10280x 10280x 41x 41x 2002x 2002x 41x 41x     41x 41x 149x 149x 41x 41x 160x 160x 41x 41x     41x 41x     41x  
// Copyright (c) ZeroC, Inc.
 
export class ProtocolInstance {
    constructor(instance, type, protocol, secure) {
        this._instance = instance;
        this._traceLevel = instance.traceLevels().network;
        this._traceCategory = instance.traceLevels().networkCat;
        this._logger = instance.initializationData().logger;
        this._properties = instance.initializationData().properties;
        this._type = type;
        this._protocol = protocol;
        this._secure = secure;
    }
 
    traceLevel() {
        return this._traceLevel;
    }
 
    traceCategory() {
        return this._traceCategory;
    }
 
    logger() {
        return this._logger;
    }
 
    protocol() {
        return this._protocol;
    }
 
    type() {
        return this._type;
    }
 
    secure() {
        return this._secure;
    }
 
    properties() {
        return this._properties;
    }
 
    defaultHost() {
        return this._instance.defaultsAndOverrides().defaultHost;
    }
 
    defaultSourceAddress() {
        return this._instance.defaultsAndOverrides().defaultSourceAddress;
    }
 
    defaultEncoding() {
        return this._instance.defaultsAndOverrides().defaultEncoding;
    }
 
    messageSizeMax() {
        return this._instance.messageSizeMax();
    }
}