fr.dgac.ivy

Class Probe


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

terminal implementation in java of the ivyprobe.

Field Summary

public static final String helpCommands
public static final String helpmsg

Constructor Summary

public Probe(BufferedReader in, boolean timestamp, boolean quiet, boolean debug)

Method Summary

public void bindPerformed(IvyClient client, int id, String re)
invoked when a Ivy Client performs a bind
public void connect(IvyClient client)
invoked when a Ivy Client has joined the bus
public void die(IvyClient client, int id, String msgarg)
invoked when a peer request us to leave the bus
public void directMessage(IvyClient client, int id, String arg)
invoked when a peer sends us a direct message
public void disconnect(IvyClient client)
invoked when a Ivy Client has left the bus
public static void main(String args)
public void receive(IvyClient client, String args)
this callback is invoked when a message has been received
public void run()
public void setExitOnDie(boolean b)
public void start(Ivy bus)
public void unbindPerformed(IvyClient client, int id, String re)
invoked when a Ivy Client performs a unbind

Field Details

helpCommands

public static final helpCommands


helpmsg

public static final helpmsg

Constructor Details

Probe

public Probe(BufferedReader in, boolean timestamp, boolean quiet, boolean debug)

Parameters:

in
timestamp
quiet
debug

Method Details

bindPerformed

public void bindPerformed(IvyClient client, int id, String re)

invoked when a Ivy Client performs a bind

Specified by:

bindPerformed in interface IvyBindListener

Parameters:

client - the peer
id
re

connect

public void connect(IvyClient client)

invoked when a Ivy Client has joined the bus

Specified by:

connect in interface IvyApplicationListener

Parameters:

client - the peer

die

public void die(IvyClient client, int id, String msgarg)

invoked when a peer request us to leave the bus

Specified by:

die in interface IvyApplicationListener

Parameters:

client - the peer
id
msgarg

directMessage

public void directMessage(IvyClient client, int id, String arg)

invoked when a peer sends us a direct message

Specified by:

directMessage in interface IvyApplicationListener

Parameters:

client - the peer
id -
arg

disconnect

public void disconnect(IvyClient client)

invoked when a Ivy Client has left the bus

Specified by:

disconnect in interface IvyApplicationListener

Parameters:

client - the peer

main

public static void main(String args)

Parameters:

args

Throws:

IvyException

receive

public void receive(IvyClient client, String args)

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

run

public void run()


setExitOnDie

public void setExitOnDie(boolean b)

Parameters:

b

start

public void start(Ivy bus)

Parameters:

bus

Throws:

IvyException

unbindPerformed

public void unbindPerformed(IvyClient client, int id, String re)

invoked when a Ivy Client performs a unbind

Specified by:

unbindPerformed in interface IvyBindListener

Parameters:

client - the peer
id
re