|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fr.dgac.ivy.Probe
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 |
bindPerformed(fr.dgac.ivy.IvyClient client,
int id,
java.lang.String re)
invoked when a Ivy Client performs a bind |
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,
java.lang.String msgarg)
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)
|
void |
unbindPerformed(fr.dgac.ivy.IvyClient client,
int id,
java.lang.String re)
invoked when a Ivy Client performs a unbind |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String helpCommands
public static final java.lang.String helpmsg
Constructor Detail |
public Probe(java.io.BufferedReader in, boolean timestamp, boolean quiet, boolean debug)
Method Detail |
public static void main(java.lang.String[] args) throws IvyException
IvyException
public void start(fr.dgac.ivy.Ivy bus) throws IvyException
IvyException
public void setExitOnDie(boolean b)
public void run()
run
in interface java.lang.Runnable
public void bindPerformed(fr.dgac.ivy.IvyClient client, int id, java.lang.String re)
IvyBindListener
bindPerformed
in interface IvyBindListener
client
- the peerre
- the regexppublic void unbindPerformed(fr.dgac.ivy.IvyClient client, int id, java.lang.String re)
IvyBindListener
unbindPerformed
in interface IvyBindListener
client
- the peerre
- the regexppublic void connect(fr.dgac.ivy.IvyClient client)
IvyApplicationListener
connect
in interface IvyApplicationListener
client
- the peerpublic void disconnect(fr.dgac.ivy.IvyClient client)
IvyApplicationListener
disconnect
in interface IvyApplicationListener
client
- the peerpublic void die(fr.dgac.ivy.IvyClient client, int id, java.lang.String msgarg)
IvyApplicationListener
die
in interface IvyApplicationListener
client
- the peerpublic void directMessage(fr.dgac.ivy.IvyClient client, int id, java.lang.String arg)
IvyApplicationListener
directMessage
in interface IvyApplicationListener
client
- the peerid
- arg
- the message itself
there is no need to use a bus close() or stop() operation within a die()
method, it will be called automatically. Furthermore, it is considered
poor style to enforce the end of a program with System.exit(), you should
consider terminating all threads ( AWT, etc )public void receive(fr.dgac.ivy.IvyClient client, java.lang.String[] args)
IvyMessageListener
receive
in interface IvyMessageListener
client
- the peer who sent the messageargs
- the array of string, on string for each subregexp
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |