All files / src/Ice WSEndpointFactory.js

100% Statements 30/30
100% Branches 6/6
100% Functions 5/5
100% Lines 30/30

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 3141x 41x 41x 41x 41x 41x 134x 134x 134x 41x 41x 414x 414x 41x 41x 47x 47x 41x 41x 1x 1x 1x 1x 41x 41x 4x 4x 4x 4x 41x  
// Copyright (c) ZeroC, Inc.
 
import { WSEndpoint } from "./WSEndpoint.js";
 
export class WSEndpointFactory {
    constructor(instance, delegate) {
        this._instance = instance;
        this._delegate = delegate;
    }
 
    type() {
        return this._instance.type();
    }
 
    protocol() {
        return this._instance.protocol();
    }
 
    create(args, oaEndpoint) {
        const e = new WSEndpoint(this._instance, this._delegate.create(args, oaEndpoint));
        e.initWithOptions(args);
        return e;
    }
 
    read(s) {
        const e = new WSEndpoint(this._instance, this._delegate.read(s));
        e.initWithStream(s);
        return e;
    }
}