Package lupos.event.communication

Examples of lupos.event.communication.SerializingMessageService


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

    // create communication channel
    SerializingMessageService msgService = ProducerBase.connectToMaster();

   
    LottoProducer wtp = LottoProducer.createLottoProducer(msgService);
    // start producer
    wtp.start();
View Full Code Here


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

    // create communication channel
    SerializingMessageService msgService = ProducerBase.connectToMaster();
   
    String location = JOptionPane.showInputDialog("Enter location to get weather:", defaultlocation);
   
    WaterTempProducer wtp = WaterTempProducer.createWaterTempProducer(msgService, location);
    // start producer
View Full Code Here

   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
   
    // create communication channel
    SerializingMessageService msgService = ProducerBase.connectToMaster();
   
    String location = JOptionPane.showInputDialog("Enter location to get weather:", defaultLocation);
    WindFinderProducer wp = WindFinderProducer.createWindFinderProducer(msgService, location);
    // start producer
    wp.start();   
View Full Code Here

   *
   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
    // create communication channel
    SerializingMessageService msgService = ProducerBase.connectToMaster();

    // start producer
    new DBDelayProducer(msgService, 30000).start();
  }
View Full Code Here

   * @param args command line parameter
   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
    // create communication channel
    SerializingMessageService msgService = ProducerBase.connectToMaster();
   
    // create new WeatherProducer
    WeatherProducer wp = new WeatherProducer(msgService);
   
    // create windows to choose the country and city you want to search
View Full Code Here

   * @param args
   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
    //Create communication channel
    SerializingMessageService msgService = ProducerBase.connectToMaster();
   
    EventsProducer tsp = new EventsProducer(msgService);
   
    //Show dialog message boxes
    tsp.SEARCH_CITY = JOptionPane.showInputDialog("Enter keyword for city or country:", tsp.SEARCH_CITY);
View Full Code Here

   * and afterwards send a connection request message to it
   * @return msgService the message service of the connection
   */
  protected static SerializingMessageService connectToMaster(){
    // 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 static void main(String[] args) throws Exception {
    // create communication channel
    SerializingMessageService msgService = ProducerBase.connectToMaster();
   
    TwitterSearchProducer tsp = new TwitterSearchProducer(msgService);
   
    tsp.SEARCH_QUERY = JOptionPane.showInputDialog("Enter keyword to be searched for on twitter:", tsp.SEARCH_QUERY);
   
View Full Code Here

      SerializingMessageService msgService) {
    super(msgService, INTERVAL);
  }

  public static void main(String[] args) throws Exception {
    SerializingMessageService msgService = ProducerBase.connectToMaster();
   
    RSSSemanticInterpretationProducer rt = new RSSSemanticInterpretationProducer(msgService);
    rt.start();
    rt.produce();
View Full Code Here

  private void start() throws Exception{
    new Thread(this).start();
    System.out.println("Master Broker started. Waiting for incoming services...");
    while (true){
      // create communication endpoint and wait for an incoming connection
      SerializingMessageService msgService = new SerializingMessageService(TcpMessageTransport.class);
      msgService.addHandler2(this);
      msgService.waitForConnection();
     
    }
  }
View Full Code Here

TOP

Related Classes of lupos.event.communication.SerializingMessageService

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.