Package org.jgroups

Examples of org.jgroups.JChannel$MyProbeHandler


  protected void applyNewConfig(byte[] buffer) {
        final InputStream in=new ByteArrayInputStream(buffer);
        Thread thread=new Thread() {
            public void run() {
                try {
                    JChannel ch=new JChannel(in);
                    Util.sleepRandom(1000, 5000);
                    channel.disconnect();
                    JChannel tmp=channel;
                    channel=ch;
                    channel.setName(name);
                    channel.setReceiver(MPerf.this);
                    channel.connect("mperf");
                    local_addr=channel.getAddress();
View Full Code Here


  }
 
  public void start() throws Exception {
    String props = "udp.xml";

    channel = new JChannel(props);

        channel.setReceiver(new ReceiverAdapter() {
            public void viewAccepted(View view) {
                setInternalState(view.getMembers());
            }
View Full Code Here

  private RpcMethods rpcMethods ;
  private RspList<String> rsp_list;
 
  private void start(String name) throws Exception {
   
    channel = new JChannel();
    if(null != name) {
      channel.setName(name);
    }
   
    messageListener = new MyMessageListener();
View Full Code Here

 
  private String props;
 
  private void start(String name) throws Exception {
   
    channel = new JChannel(props);
    if(null != name) {
      channel.setName(name);
    }
   
    messageListener = new MyMessageListener();
View Full Code Here

 
  private String props;
 
  private void start(String name) throws Exception {
   
    channel = new JChannel(props);
    if(null != name) {
      channel.setName(name);
    }
   
    messageListener = new MyMessageListener();
View Full Code Here

      help();
    }


    logger.info("Create Channel with name " + name);
    channel=new JChannel(props);
   
    if(name != null){
      channel.setName(name);
    }
   
View Full Code Here

 
  private String props;
 
  private void start(String name) throws Exception {
   
    channel = new JChannel(props);
    if(null != name) {
      channel.setName(name);
    }
   
    messageListener = new MyMessageListener();
View Full Code Here

  public void test() throws Exception {
   
    logger.info("'org.jgroups.blocks.RpcDispatcher' test");
   
    channel = new JChannel();
    disp = new RpcDispatcher(channel, this);
    channel.connect("RpcDispatcherTestGroup");
   
    logger.info(" -> View Id: " + channel.getView().getViewId());
    logger.info(" -> View Creater: " + channel.getView().getCreator());
View Full Code Here

*/
public class TPTest {

  public static void main(String[] args) throws Exception {

    JChannel channel = new JChannel(args[0]);
   
    channel.setReceiver(new ReceiverAdapter(){

      public void receive(Message msg) {
        Address sender=msg.getSrc();
        System.out.println(msg.getObject() + " [" + sender + "]");
      }

      public void viewAccepted(View view) {
        System.out.println("view: " + view);
      }});
   
    channel.connect("TPTest");
   
    TP transport = channel.getProtocolStack().getTransport();
   
    System.out.println("-------------- JGroups Protocol Stack Transport ----------------------");
    System.out.println("transport.getInfo(): " + transport.getInfo());
    System.out.println("transport.isSingleton(): " + transport.isSingleton());
    System.out.println("transport.getBindAddress(): " + transport.getBindAddress());
    System.out.println("transport.getBindPort(): " + transport.getBindPort());
    System.out.println("----------------------------------------------------------------------");
   
    for (;;) {
      String line = Util.readStringFromStdin(": ");
      channel.send(null, line);
    }
  }
View Full Code Here

public class JChannelLogicNameTest {

  public static void main(String[] args) throws Exception {

    JChannel channel = new JChannel("udp.xml");
//    channel.setName("JBoss Cluster");
//    channel.connect("JChannelLogicNameTest");
//    System.out.println(channel.getAddress());
//    System.out.println(channel.getClusterName());
    System.out.println(channel.getView());
  }
View Full Code Here

TOP

Related Classes of org.jgroups.JChannel$MyProbeHandler

Copyright © 2018 www.massapicom. 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.