Examples of JChannel


Examples of org.jgroups.JChannel

    this.configuration = configuration ;
  }

  public Channel createChannel(String id) throws Exception {
   
    JChannel channel = new MuxChannel(this);
   
    // We need to synchronize on shared transport,
        // so we don't attempt to init a shared transport multiple times
    TP transport = channel.getProtocolStack().getTransport();
    if(transport.isSingleton()) {
      synchronized(transport) {
        init(transport);
      }
    } else {
      init(transport);
    }
   
    channel.setName(configuration.getNodeName() + "/" + id);
   
    TransportConfiguration.Topology topology = configuration.getTransport().getTopology();
    if (topology != null) {
      channel.setAddressGenerator(new TopologyAddressGenerator(channel, topology.getSite(), topology.getRack(), topology.getMachine()));
    }
   
    MBeanServer server = configuration.getMBeanServer();
    if (server != null) {
            try {
                this.channels.put(channel, id);
                JmxConfigurator.registerChannel(channel, server, id);
            } catch (Exception e) {
              logger.warn(e.getMessage(), e);
            }
            channel.addChannelListener(this);
        }
   
    return channel;
  }
View Full Code Here

Examples of org.jgroups.JChannel

  }

  public void start(String props, String name, String clusterName, boolean isDiscardOwn) throws Exception {
   
   
    channel = new JChannel();
    if(null != name) {
      channel.setName(name);
    }
    channel.setReceiver(this);
    channel.setDiscardOwnMessages(true);
View Full Code Here

Examples of org.jgroups.JChannel

    this.provider_fails = provider_fails;
    this.requester_fails = requester_fails;
    this.delay = delay;
    this.size = size;
   
    channel = new JChannel(props);
    channel.setReceiver(this);
   
    if(name != null) {
      channel.setName(name);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.