throw new IllegalArgumentException("stack name and service ID have to be non null");
if(stack_name.length()==0 || id.length() == 0)
throw new IllegalArgumentException("stack name and service ID have to non empty strings");
Multiplexer mux = null;
synchronized (channels) {
if (!channels.containsKey(stack_name)) {
JChannel ch = new JChannel(getConfig(stack_name));
registerChannel(ch, stack_name);
mux = new Multiplexer(ch);
channels.put(stack_name, mux);
} else {
mux = channels.get(stack_name);
}
}
if(register_for_state_transfer)
mux.registerForStateTransfer(id, substate_id);
Channel c = mux.createMuxChannel(id, stack_name);
c.addChannelListener(new MuxFactoryChannelListener());
return c;
}