fr.dgac.ivy
Class IvyClient

java.lang.Object
  |
  +--fr.dgac.ivy.IvyClient
All Implemented Interfaces:
java.lang.Runnable

public class IvyClient
extends java.lang.Object
implements java.lang.Runnable


Constructor Summary
protected IvyClient(fr.dgac.ivy.Ivy bus, java.lang.String appName, java.util.Hashtable regexp_text)
           
 
Method Summary
protected  void close(boolean notify)
           
protected  void delRegexp(int id)
           
 java.lang.String getApplicationName()
          returns the name of the remote agent.
protected  int getAppPort()
           
protected  java.lang.Integer getClientKey()
           
 java.util.Enumeration getRegexps()
          allow an Ivy package class to access the list of regexps at a given time.
 void run()
           
protected  boolean sameClient(fr.dgac.ivy.IvyClient clnt)
           
 void sendDie()
          asks the remote client to leave the bus; no message is joined.
 void sendDie(java.lang.String message)
          asks the remote client to leave the bus.
 void sendDirectMsg(int id, java.lang.String message)
          sends a direct message to the peer
protected  int sendMsg(java.lang.String message)
          sends the substrings of a message to the peer for each matching regexp.
protected  void sendPing(java.lang.String s)
           
protected  void sendPong(java.lang.String s)
           
protected  void sendRegexp(int id, java.lang.String regexp)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IvyClient

protected IvyClient(fr.dgac.ivy.Ivy bus,
                    java.lang.String appName,
                    java.util.Hashtable regexp_text)
Method Detail

getApplicationName

public java.lang.String getApplicationName()
returns the name of the remote agent.


getClientKey

protected java.lang.Integer getClientKey()

getRegexps

public java.util.Enumeration getRegexps()
allow an Ivy package class to access the list of regexps at a given time. perhaps we should implement a new IvyApplicationListener method to allow the notification of regexp addition and deletion


getAppPort

protected int getAppPort()

sendRegexp

protected void sendRegexp(int id,
                          java.lang.String regexp)

delRegexp

protected void delRegexp(int id)

sendDirectMsg

public void sendDirectMsg(int id,
                          java.lang.String message)
sends a direct message to the peer

Parameters:
id - the numeric value provided to the remote client
message - the string that will be match-tested

close

protected void close(boolean notify)
              throws java.io.IOException
java.io.IOException

sendMsg

protected int sendMsg(java.lang.String message)
sends the substrings of a message to the peer for each matching regexp.

Parameters:
message - the string that will be match-tested
Returns:
the number of messages sent to the peer

sameClient

protected boolean sameClient(fr.dgac.ivy.IvyClient clnt)

run

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

sendPong

protected void sendPong(java.lang.String s)

sendPing

protected void sendPing(java.lang.String s)

sendDie

public void sendDie()
asks the remote client to leave the bus; no message is joined.


sendDie

public void sendDie(java.lang.String message)
asks the remote client to leave the bus.

Parameters:
message - the message that will be carried

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object