Package lupos.event.communication

Examples of lupos.event.communication.ConnectionRequest


    // create communication channel
    SerializingMessageService msgService = null;
    try {
      msgService = new SerializingMessageService(TcpMessageTransport.class);
      msgService.connect(new TcpConnectInfo(JOptionPane.showInputDialog("Enter the host IP adress of the MasterBroker:", "localhost"), Integer.parseInt(JOptionPane.showInputDialog("Enter the host port of the MasterBroker:", "4444"))));
      msgService.sendMessage(new ConnectionRequest(ConnectionRequest.REQUESTTYPE_PRODUCER));
    } catch (Exception e) {
      e.printStackTrace();
    }
    return msgService;
  }
View Full Code Here


  public void disconnected(){
    // Connect to the sub broker when disconnected
    // which should only occur on handshake
    try {
      this.msgService.connect(this.connectingSubBroker);
      ConnectionRequest conReq = new ConnectionRequest(ConnectionRequest.REQUESTTYPE_PRODUCER);
      conReq.setPort(TcpMessageTransport.SERVER_PORT);
      this.msgService.sendMessage(conReq);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of lupos.event.communication.ConnectionRequest

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.