if(entry.multiplexer != null) entry.multiplexer.addServiceIfNotPresent(ch.getId(), ch);
    public void connect(MuxChannel ch) throws ChannelException {        Entry entry;        synchronized(channels) {            entry=(Entry)channels.get(ch.getStackName());        }        if(entry != null) {            synchronized(entry) {                if(entry.channel == null)                    throw new ChannelException("channel has to be created before it can be connected");                if(!entry.channel.isConnected()) {                    entry.channel.connect(ch.getStackName());                    if(entry.multiplexer != null) {                        try {                            entry.multiplexer.fetchServiceInformation();                        }                        catch(Exception e) {                            if(log.isErrorEnabled())                                log.error("failed fetching service state", e);                        }                    }                }                if(entry.multiplexer != null) {                    try {                        Address addr=entry.channel.getLocalAddress();                        entry.multiplexer.sendServiceUpMessage(ch.getId(), addr);                    }                    catch(Exception e) {                        if(log.isErrorEnabled())                            log.error("failed sending SERVICE_UP message", e);                    }                }            }        }        ch.setClosed(false);        ch.setConnected(true);    }