All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.cmu.paid.network.voyager.MulticastAgent

java.lang.Object
   |
   +----edu.cmu.paid.network.voyager.MulticastAgent

public class MulticastAgent
extends Object
implements IMulticastAgent, Serializable
This is a local object container used to hold objects to be linked in a multicasting network.

Author:
Barrett Trask
See Also:
IMulticastAgent

Constructor Index

 o MulticastAgent()
Constructor used to initialize the neighbors of this MulticastAgent.
 o MulticastAgent(MulticastAgent[])
Constructor used to initialize the neighbors of this MulticastAgent.

Method Index

 o add(Object)
Function to add objects to agent to allow message delivery.
 o connect(IMulticastAgent)
Create a connection to another MulticastAgent.
 o contains(Object)
Check if an object is contained in this agent.
 o disconnect(IMulticastAgent)
Delete a connection to another MulticastAgent.
 o getContents()
Get an array of all objects contained by this agent.
 o getISubspace()
 o getSubspace()
 o isNeighbor(IMulticastAgent)
Checks if the agent is connected.
 o multicast(String, Object[], String)
Mutlicast to objects or interfaces contained within a set of interconnected agents.
 o publish(EventObject, Topic)
Publish an event on a given topic in a set of interconnected agents.
 o remove(Object)
Function to remove objects from agent.

Constructors

 o MulticastAgent
 public MulticastAgent()
Constructor used to initialize the neighbors of this MulticastAgent.

 o MulticastAgent
 public MulticastAgent(MulticastAgent neighborList[])
Constructor used to initialize the neighbors of this MulticastAgent.

Parameters:
neighborList - List of MulticastAgents to connect to this new agent.

Methods

 o connect
 public void connect(IMulticastAgent newNeighbor)
Create a connection to another MulticastAgent.

Parameters:
newNeighbor - The agent to make the new connection to.
 o disconnect
 public void disconnect(IMulticastAgent oldNeighbor)
Delete a connection to another MulticastAgent.

Parameters:
oldNeighbor - The neighboring agent to remove its connection.
 o isNeighbor
 public boolean isNeighbor(IMulticastAgent agent)
Checks if the agent is connected.

Parameters:
agent - The agent whose connection is being checked.
Returns:
True if the agent is a connected neighbor, false otherwise.
 o add
 public void add(Object newObject)
Function to add objects to agent to allow message delivery.

Parameters:
newObject - The reference to the object to be inserted into the agent.
 o remove
 public void remove(Object oldObject)
Function to remove objects from agent.

Parameters:
oldObject - An object within an agent to be removed.
 o getContents
 public Object[] getContents()
Get an array of all objects contained by this agent.

Returns:
An array of objects.
 o contains
 public boolean contains(Object object)
Check if an object is contained in this agent.

Parameters:
object - The object reference to check.
Returns:
True if the object is here, false otherwise.
 o multicast
 public void multicast(String methodSig,
                       Object args[],
                       String className)
Mutlicast to objects or interfaces contained within a set of interconnected agents.

Parameters:
methodSig - The method name if unique. The entire signature with parameter types specified in parentheses.
args - An array of object to pass to the method as arguments.
className - The name of a class or interface contained within an agent
 o publish
 public void publish(EventObject event,
                     Topic topic)
Publish an event on a given topic in a set of interconnected agents. Only objects that implement the event listener interface will be able to receive events.

Parameters:
event - A java event.
topic - A hierarchical string, delineated with '.', of topic fields. Wildcards '*' and "<" may be used. '*' matches for next field. '<' matches for all remaining fields.
 o getSubspace
 public Subspace getSubspace()
Returns:
The private subspace member.
 o getISubspace
 public ISubspace getISubspace()
Returns:
A proxy of the private subspace member cast into an interface.

All Packages  Class Hierarchy  This Package  Previous  Next  Index

This page is hosted by the Chair for Applied Software Engineering of the Technische Universität München.
Imprint (Impressum)