/** Allows to be notified when a channel event such as connect, disconnect or close occurs. E.g. a PullPushAdapter may choose to stop when the channel is closed, or to start when it is opened. @deprecated Use addChannelListener() instead */ public void setChannelListener(ChannelListener channel_listener) { addChannelListener(channel_listener); }
public RpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj, boolean deadlock_detection, boolean concurrent_processing) { super(channel, l, l2, deadlock_detection, concurrent_processing); channel.addChannelListener(this); this.server_obj=server_obj; }
public RpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj) { super(channel, l, l2); channel.addChannelListener(this); this.server_obj=server_obj; }
public RpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj, boolean deadlock_detection) { super(channel, l, l2, deadlock_detection); channel.addChannelListener(this); this.server_obj=server_obj; }
public RpcDispatcher(PullPushAdapter adapter, Serializable id, MessageListener l, MembershipListener l2, Object server_obj) { super(adapter, id, l, l2); // Fixes bug #804956 // channel.setChannelListener(this); if(this.adapter != null) { Transport t=this.adapter.getTransport(); if(t != null && t instanceof Channel) { ((Channel)t).addChannelListener(this); } } this.server_obj=server_obj; }
public Draw(Channel channel, boolean use_state, long state_timeout) throws Exception { this.channel=channel; channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE); channel.setReceiver(this); channel.addChannelListener(this); this.use_state=use_state; this.state_timeout=state_timeout; }
public Draw(Channel channel) throws Exception { this.channel=channel; channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE); channel.setReceiver(this); channel.addChannelListener(this); }
public Draw(String props, boolean no_channel, boolean jmx, boolean use_state, long state_timeout) throws Exception { this.no_channel=no_channel; this.jmx=jmx; this.use_state=use_state; this.state_timeout=state_timeout; if(no_channel) return; channel=new JChannel(props); // channel.setOpt(Channel.BLOCK, Boolean.TRUE); channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE); channel.setReceiver(this); channel.addChannelListener(this); }
public Gossip(String props, long traffic) throws Exception { channel=new JChannel(props); channel.addChannelListener(this); channel.setOpt(Channel.AUTO_RECONNECT, Boolean.TRUE); traffic_interval=traffic; if(traffic_interval > 0) { gen=new TrafficGenerator(); gen.start(); } }
RpcHandler(short scopeId, Channel channel, MessageListener messageListener, MembershipListener membershipListener, Marshaller reqMarshaller, Marshaller rspMarshaller) { super(scopeId); setMessageListener(messageListener); setMembershipListener(membershipListener); setRequestMarshaller(reqMarshaller); setResponseMarshaller(rspMarshaller); setChannel(channel); channel.addChannelListener(this); start(); }
this.channel.addChannelListener(listener);
this.channel.addChannelListener(listener);
RpcHandler(short scopeId, Channel channel, MessageListener messageListener, MembershipListener membershipListener, Marshaller reqMarshaller, Marshaller rspMarshaller) { super(scopeId); setMessageListener(messageListener); setMembershipListener(membershipListener); setRequestMarshaller(reqMarshaller); setResponseMarshaller(rspMarshaller); setChannel(channel); channel.addChannelListener(this); start(); }
@Override protected void init() { try { if (this.channel == null) { this.channel = newChannel(jgroupsConfig); } ProtocolStack protocolStack = channel.getProtocolStack(); Protocol centralLock = protocolStack.findProtocol(CENTRAL_LOCK.class); if (centralLock == null) { // add the locking protocol CENTRAL_LOCK lockingProtocol = new CENTRAL_LOCK(); // we have to call init because the channel has already been created lockingProtocol.init(); protocolStack.addProtocol(lockingProtocol); } // Add a listener through which we'll know what's going on within the cluster ... this.channel.addChannelListener(listener); // Set the receiver through which we'll receive all of the changes ... this.channel.setReceiver(receiver); // Now connect to the cluster ... this.channel.connect(clusterName); } catch (Exception e) { throw new RuntimeException(e); } }
@Override protected void init() { try { if (this.channel == null) { this.channel = newChannel(jgroupsConfig); } ProtocolStack protocolStack = channel.getProtocolStack(); Protocol centralLock = protocolStack.findProtocol(CENTRAL_LOCK.class); if (centralLock == null) { // add the locking protocol CENTRAL_LOCK lockingProtocol = new CENTRAL_LOCK(); // we have to call init because the channel has already been created lockingProtocol.init(); protocolStack.addProtocol(lockingProtocol); } // Add a listener through which we'll know what's going on within the cluster ... this.channel.addChannelListener(listener); // Set the receiver through which we'll receive all of the changes ... this.channel.setReceiver(receiver); // Now connect to the cluster ... this.channel.connect(clusterName); } catch (Exception e) { throw new RuntimeException(e); } }
@Override public void start(StartContext context) throws StartException { ChannelFactory factory = this.factory.getValue(); try { this.channel = factory.createChannel(this.id); this.channel.addChannelListener(this); // Don't connect the channel here // This will be done by Infinispan (see AS7-5904) } catch (Exception e) { throw new StartException(e); } if (ROOT_LOGGER.isTraceEnabled()) { String output = this.channel.getProtocolStack().printProtocolSpec(true); ROOT_LOGGER.tracef("JGroups channel named %s created with configuration:\n %s", this.id, output); } }