aboutsummaryrefslogtreecommitdiff
path: root/src/Puppet.java
blob: d122d5205bedc3d5bb761f8131b4ddb4a12bd5e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package fr.dgac.ivy ;
import java.lang.Thread;
import java.net.*;
import java.io.*;
import java.util.*;
import org.apache.regexp.*;

class Puppet extends Ivy {

  Hashtable bound = new Hashtable(); // clef: l'ID de la regexp choisi par le ghost, valeur: l'Int de l'abonnement local
  String myDomain;
  ProxyClient pc;

  Puppet(ProxyClient pc,String domain) {
    super("noname","noname not ready",null);
    myDomain=domain;
    this.pc=pc;
  }

  void parse(String s){
    System.out.println("the puppet must parse "+s);
  }

  protected IvyClient createIvyClient(Socket s,int port, boolean domachin) throws IOException {
    return new PuppetClient();
  }

  class PuppetClient extends IvyClient {
    protected synchronized void sendBuffer( String buffer ) throws IvyException {
      super.sendBuffer(buffer); // and to all the agents on the Ghost bus ? I'm not sure
    }

    protected boolean newParseMsg(String s) throws IvyException {
      return super.newParseMsg(s);
    }
  } // class PuppetClient

}