diff options
author | jestin | 2006-08-01 21:42:25 +0000 |
---|---|---|
committer | jestin | 2006-08-01 21:42:25 +0000 |
commit | fdb4cc200dca5db5b374fc40ab3723eb8bf96886 (patch) | |
tree | 0398ad466257c6cacb5c1b28fa6597474025ec3b /src/Ghost.java | |
parent | 21cec28549587db7e34d0ac455244fe4d73a0ed4 (diff) | |
download | ivy-java-fdb4cc200dca5db5b374fc40ab3723eb8bf96886.zip ivy-java-fdb4cc200dca5db5b374fc40ab3723eb8bf96886.tar.gz ivy-java-fdb4cc200dca5db5b374fc40ab3723eb8bf96886.tar.bz2 ivy-java-fdb4cc200dca5db5b374fc40ab3723eb8bf96886.tar.xz |
small steps towards the Ivy tunnel . This is work in progress...
Diffstat (limited to 'src/Ghost.java')
-rw-r--r-- | src/Ghost.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Ghost.java b/src/Ghost.java index ad6e78c..fd7465d 100644 --- a/src/Ghost.java +++ b/src/Ghost.java @@ -22,18 +22,21 @@ class Ghost extends IvyClient { super(bus,socket,remotePort,incoming); this.id=id; this.pc=pc; + System.out.println("new Ghost: "+id+" pc:"+pc); } + // ProxyClient -> Ghost -> Ivy Bus protected synchronized void sendBuffer( String buffer ) throws IvyException { - System.out.println("out buffer: "+buffer); - pc.forward(id,buffer); - super.sendBuffer(buffer); + // System.out.println("out buffer: "+buffer+" for:"+pc+" id:"+id); + super.sendBuffer(buffer); // and to all the agents on the Ghost bus ? I'm not sure } + // Bus -> Ghost -> ProxyClient -> ProxyMaster -> other buses protected boolean newParseMsg(String s) throws IvyException { - System.out.println("in buffer: "+s); - pc.forward(id,buffer); - return super.newParseMsg(s); + // I received a message from an agent on the bus + System.out.println("in buffer to forward from "+id+": "+s); + if (pc!=null) pc.forward(id,s); // forward to all the puppets + return super.newParseMsg(s); // I'll take no action } } |