Class InformationRuleMaster

java.lang.Object
  |
  +--swarm.BaseImpl
        |
        +--swarm.objectbase.SwarmObjectImpl
              |
              +--InformationRuleMaster
All Implemented Interfaces:
swarm.defobj.Create, swarm.defobj.CreateS, swarm.defobj.Customize, swarm.defobj.CustomizeS, swarm.defobj.DefinedObject, swarm.defobj.DefinedObjectS, swarm.defobj.Drop, swarm.defobj.DropS, swarm.defobj.GetName, swarm.defobj.GetNameS, swarm.objectbase.SwarmObject, swarm.objectbase.SwarmObjectS

public class InformationRuleMaster
extends swarm.objectbase.SwarmObjectImpl

we follow the InformationRuleMaster to deal with the news management

Author:
Paolo Pelligra; IO improved by Michele Sonnessa

Field Summary
 int[][] informationFlowMatrix
          the matrix containing the rules to manage the information flow
 int receivingUnit
          the number of the unit to which we have to send a news
 int sendingUnit
          the number of the unit which is calling the InformationRuleMaster, to send a news
 
Constructor Summary
InformationRuleMaster(swarm.defobj.Zone aZone, int un)
          constructor for InformationRuleMaster
 
Method Summary
 boolean checkToSendNews(int s, int r)
          the sending unit checks if the information flow to the receiving unit is or not open
 
Methods inherited from class swarm.objectbase.SwarmObjectImpl
compare, describe, describeID, drop, getCompleteProbeMap, getDisplayName, getName, getProbeForMessage, getProbeForVariable, getProbeMap, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sendingUnit

public int sendingUnit
the number of the unit which is calling the InformationRuleMaster, to send a news


receivingUnit

public int receivingUnit
the number of the unit to which we have to send a news


informationFlowMatrix

public int[][] informationFlowMatrix
the matrix containing the rules to manage the information flow

Constructor Detail

InformationRuleMaster

public InformationRuleMaster(swarm.defobj.Zone aZone,
                             int un)
constructor for InformationRuleMaster

Method Detail

checkToSendNews

public boolean checkToSendNews(int s,
                               int r)
the sending unit checks if the information flow to the receiving unit is or not open