GridSim 5.0 beta

gridsim.net.fnb
Class FnbDroppedUserObject

Object
  extended by FnbDroppedUserObject
All Implemented Interfaces:
Packet

public class FnbDroppedUserObject
extends Object
implements Packet

This class is used by a router to inform users of a dropped packet.

Since:
GridSim Toolkit 4.2
Author:
Agustin Caminero, Universidad de Castilla La Mancha (Spain).

Constructor Summary
FnbDroppedUserObject(int userID, int objectID, boolean isfile)
          Create an object of this class.
 
Method Summary
 int getDestID()
          Returns the destination id of this packet.
 int getID()
          Returns the ID of this object (e.g.
 boolean getIsFile()
          Gets the isFile
 int getLast()
          Gets an entity ID from the last hop that this packet has traversed.
 int getNetServiceType()
          Gets the network service type of this packet
 long getSize()
          Returns the size of this packet
 int getSrcID()
          Returns the ID of the source of this packet.
 int getTag()
          Gets this packet tag.
 int getUserID()
          Gets the user id
 void setLast(int last)
          Sets an entity ID from the last hop that this packet has traversed.
Note that this method is not used.
 void setNetServiceType(int serviceType)
          Sets the network service type of this packet.
Note that this method is not used.
 boolean setSize(long size)
          Sets the size of this packet.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Packet
toString
 

Constructor Detail

FnbDroppedUserObject

public FnbDroppedUserObject(int userID,
                            int objectID,
                            boolean isfile)
Create an object of this class.

Parameters:
userID - the user id
objectID - the packet id
Method Detail

getIsFile

public boolean getIsFile()
Gets the isFile

Returns:
true if this is a file, false otherwise

getUserID

public int getUserID()
Gets the user id

Returns:
user id

getTag

public int getTag()
Gets this packet tag.

Specified by:
getTag in interface Packet
Returns:
-1 since no packet tag has been stored in this class.
Pre Condition:
$none
Post Condition:
$none

setLast

public void setLast(int last)
Sets an entity ID from the last hop that this packet has traversed.
Note that this method is not used.

Specified by:
setLast in interface Packet
Parameters:
last - an entity ID from the last hop
Pre Condition:
last > 0
Post Condition:
$none

getLast

public int getLast()
Gets an entity ID from the last hop that this packet has traversed.

Specified by:
getLast in interface Packet
Returns:
-1 since no entity ID has been stored in this class.
Pre Condition:
$none
Post Condition:
$none

setNetServiceType

public void setNetServiceType(int serviceType)
Sets the network service type of this packet.
Note that this method is not used.

Specified by:
setNetServiceType in interface Packet
Parameters:
serviceType - this packet's service type
Pre Condition:
serviceType >= 0
Post Condition:
$none

getNetServiceType

public int getNetServiceType()
Gets the network service type of this packet

Specified by:
getNetServiceType in interface Packet
Returns:
-1 since no network service type has been stored in this class.
Pre Condition:
$none
Post Condition:
$none

getSrcID

public int getSrcID()
Returns the ID of the source of this packet.

Specified by:
getSrcID in interface Packet
Returns:
-1 since no source ID has been stored in this class.
Pre Condition:
$none
Post Condition:
$none

getID

public int getID()
Returns the ID of this object (e.g. gridlet ID)

Specified by:
getID in interface Packet
Returns:
packet ID
Pre Condition:
$none
Post Condition:
$none

getDestID

public int getDestID()
Returns the destination id of this packet.

Specified by:
getDestID in interface Packet
Returns:
-1 since no destination ID has been stored in this class.
Pre Condition:
$none
Post Condition:
$none

setSize

public boolean setSize(long size)
Sets the size of this packet.
Note that this method is not used.

Specified by:
setSize in interface Packet
Parameters:
size - size of the packet
Returns:
false since this method is not used.
Pre Condition:
size >= 0
Post Condition:
$none

getSize

public long getSize()
Returns the size of this packet

Specified by:
getSize in interface Packet
Returns:
size of the packet
Pre Condition:
$none
Post Condition:
$none

GridSim 5.0 beta

The University of Melbourne, Australia, 2009