protected final JChannel 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) return this; }
protected final JChannel 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) return this; }
protected final JChannel 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) return this; }
protected final JChannel 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) return this; }
protected final void init(ProtocolStackConfigurator configurator) throws ChannelException { if(log.isInfoEnabled()) log.info("JGroups version: " + Version.description); ConfiguratorFactory.substituteVariables(configurator); // replace vars with system props props=configurator.getProtocolStackString(); prot_stack=new ProtocolStack(this, props); try { prot_stack.setup(); // Setup protocol stack (create layers, queues between them } catch(Throwable e) { throw new ChannelException("unable to setup the protocol stack", e); } }
/** * Opens the channel. * This does the following actions: * <ol> * <li> Resets the receiver queue by calling Queue.reset * <li> Sets up the protocol stack by calling ProtocolStack.setup * <li> Sets the closed flag to false * </ol> */ public synchronized void open() throws ChannelException { if(!closed) throw new ChannelException("channel is already open"); try { mq.reset(); // new stack is created on open() - bela June 12 2003 prot_stack=new ProtocolStack(this, props); prot_stack.setup(); closed=false; } catch(Exception e) { throw new ChannelException("failed to open channel" , e); } }