fr.dgac.ivy
Class Probe

java.lang.Object
  |
  +--fr.dgac.ivy.Probe
All Implemented Interfaces:
java.util.EventListener, IvyApplicationListener, IvyMessageListener, java.lang.Runnable

public class Probe
extends java.lang.Object
implements IvyApplicationListener, IvyMessageListener, java.lang.Runnable


Field Summary
static java.lang.String helpCommands
           
static java.lang.String helpmsg
           
 
Constructor Summary
Probe(java.io.BufferedReader in, boolean timestamp, boolean quiet, boolean debug)
           
 
Method Summary
 void connect(fr.dgac.ivy.IvyClient client)
          invoked when a Ivy Client has joined the bus
 void die(fr.dgac.ivy.IvyClient client, int id)
          invoked when a peer request us to leave the bus
 void directMessage(fr.dgac.ivy.IvyClient client, int id, java.lang.String arg)
          invoked when a peer sends us a direct message
 void disconnect(fr.dgac.ivy.IvyClient client)
          invoked when a Ivy Client has left the bus
static void main(java.lang.String[] args)
           
 void receive(fr.dgac.ivy.IvyClient client, java.lang.String[] args)
          this callback is invoked when a message has been received
 void run()
           
 void setExitOnDie(boolean b)
           
 void start(fr.dgac.ivy.Ivy bus)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helpCommands

public static final java.lang.String helpCommands
See Also:
Constant Field Values

helpmsg

public static final java.lang.String helpmsg
See Also:
Constant Field Values
Constructor Detail

Probe

public Probe(java.io.BufferedReader in,
             boolean timestamp,
             boolean quiet,
             boolean debug)
Method Detail

main

public static void main(java.lang.String[] args)
                 throws IvyException
IvyException

start

public void start(fr.dgac.ivy.Ivy bus)
           throws IvyException
IvyException

setExitOnDie

public void setExitOnDie(boolean b)

run

public void run()
Specified by:
run in interface java.lang.Runnable

connect

public void connect(fr.dgac.ivy.IvyClient client)
Description copied from interface: IvyApplicationListener
invoked when a Ivy Client has joined the bus

Specified by:
connect in interface IvyApplicationListener
Parameters:
client - the peer

disconnect

public void disconnect(fr.dgac.ivy.IvyClient client)
Description copied from interface: IvyApplicationListener
invoked when a Ivy Client has left the bus

Specified by:
disconnect in interface IvyApplicationListener
Parameters:
client - the peer

die

public void die(fr.dgac.ivy.IvyClient client,
                int id)
Description copied from interface: IvyApplicationListener
invoked when a peer request us to leave the bus

Specified by:
die in interface IvyApplicationListener
Parameters:
client - the peer

directMessage

public void directMessage(fr.dgac.ivy.IvyClient client,
                          int id,
                          java.lang.String arg)
Description copied from interface: IvyApplicationListener
invoked when a peer sends us a direct message

Specified by:
directMessage in interface IvyApplicationListener
Parameters:
client - the peer
id -
arg - the message itself this is not yet implemented in java. I believe it has no real use :)

receive

public void receive(fr.dgac.ivy.IvyClient client,
                    java.lang.String[] args)
Description copied from interface: IvyMessageListener
this callback is invoked when a message has been received

Specified by:
receive in interface IvyMessageListener
Parameters:
client - the peer who sent the message
args - the array of string, on string for each subregexp