Revision: 27
http://gridsim.svn.sourceforge.net/gridsim/?rev=27&view=rev
Author: sulistio
Date: 2007-08-21 19:41:03 -0700 (Tue, 21 Aug 2007)
Log Message:
-----------
initial release. This interface class contains common methods shared by Input and Output class.
Added Paths:
-----------
branches/gridsim4.0-branch2/source/gridsim/net/NetIO.java
Added: branches/gridsim4.0-branch2/source/gridsim/net/NetIO.java
===================================================================
--- branches/gridsim4.0-branch2/source/gridsim/net/NetIO.java (rev 0)
+++ branches/gridsim4.0-branch2/source/gridsim/net/NetIO.java 2007-08-22 02:41:03 UTC (rev 27)
@@ -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.
|