public void registerSession(String session, NetworkOwner owner, boolean broadcast) {
        sessions.compute(session, (name, owners) -> {
            if (owners == null) {
                owners = new ConcurrentLinkedDeque<>();
                if (broadcast)
                    net.registerSession(session);
            }
            else if (owners.contains(owner))
                throw new IllegalArgumentException("Session '" + session + "' with owner '" + owner + "' already registered with " +  this);

            owners.push(owner);
            return owners;
        });
    }
Returns a network multiplexer with a single {@link NetworkOwner}, which shuts down when this owner detaches.
messagebus/src/main/java/com/yahoo/messagebus/network/NetworkMultiplexer.java