From: <sul...@us...> - 2008-08-03 05:58:33
|
Revision: 194 http://gridsim.svn.sourceforge.net/gridsim/?rev=194&view=rev Author: sulistio Date: 2008-08-03 05:58:42 +0000 (Sun, 03 Aug 2008) Log Message: ----------- initial release. this interface class is used to allow different I/O entity port. Added Paths: ----------- trunk/source/gridsim/net/NetIO.java Added: trunk/source/gridsim/net/NetIO.java =================================================================== --- trunk/source/gridsim/net/NetIO.java (rev 0) +++ trunk/source/gridsim/net/NetIO.java 2008-08-03 05:58:42 UTC (rev 194) @@ -0,0 +1,65 @@ +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Anthony Sulistio + * Organization: The University of Melbourne, Australia + * Created on: Wednesday, 22 August 2007 + */ + +package gridsim.net; + +import gridsim.util.TrafficGenerator; +import java.util.Collection; + +/** + * This class contains the structure for Input and Output entities. + * @since GridSim Toolkit 4.1 + * @author Anthony Sulistio + */ +public interface NetIO +{ + /** + * Sets this entity's link. This should be used only if the network + * extensions are being used. + * + * @param link the link to which this entity should send/receive data + */ + void addLink(Link link); + + /** + * Gets the baud rate + * @return the baud rate + */ + double getBaudRate(); + + /** + * Sets the background traffic generator for <b>Output</b> entity only. + * <p> + * When simulation starts, this entity will automatically sends junk + * packets to resource entities. + * @param gen a background traffic generator + * @return <tt>true</tt> if successful, <tt>false</tt> otherwise + */ + boolean setBackgroundTraffic(TrafficGenerator gen); + + /** + * Sets the background traffic generator for <b>Output</b> entity only. + * <p> + * When simulation starts, this entity will automatically sends junk + * packets to resource entities and other entities. <br> + * NOTE: Sending background traffic to itself is not supported. + * + * @param gen a background traffic generator + * @param userName a collection of user entity name (in String object). + * @return <tt>true</tt> if successful, <tt>false</tt> otherwise + * @pre gen != null + * @pre userName != null + * @post $none + */ + boolean setBackgroundTraffic(TrafficGenerator gen, Collection userName); + +} // end interface + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |