protected final void init(ProtocolStackConfigurator configurator) throws Exception { List<ProtocolConfiguration> configs = configurator.getProtocolStack(); // replace vars with system props configs.forEach(ProtocolConfiguration::substituteVariables); prot_stack = new ProtocolStack(this); prot_stack.setup(configs); // Setup protocol stack (creates protocol, calls init() on them) }
protected final void init(JChannel ch) throws Exception { if (ch == null) throw new IllegalArgumentException("channel is null"); prot_stack = new ProtocolStack(this); prot_stack.setup( ch.getProtocolStack()); // Setup protocol stack (creates protocol, calls init() on them) }