gridbroker
Class UserEntity

Object
  extended byThread
      extended byeduni.simjava.Sim_entity
          extended bygridsim.GridSim
              extended bygridbroker.UserEntity
All Implemented Interfaces:
Cloneable, Runnable

public class UserEntity
extends GridSim

UserEntity class is an entity that simulates the user. It invokes the broker and passes the user requirements. When it receives the results of application processing, it records parameters of interest with gridsim.Statistics entity. When it has no more processing requirements, it sends END_OF_SIMULATION event to gridsim.GridSimShutdown entity.

Version:
2.1, June 2003
Author:
Manzur Murshed and Rajkumar Buyya
Invariant:
$none

Field Summary
 
Fields inherited from class gridsim.GridSim
input, output, rand, SimulationStartDate
 
Fields inherited from class eduni.simjava.Sim_entity
 
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UserEntity(String name, Experiment expt, double baudRate, long seed, double successiveExperimentDelay, boolean resultDisplay)
          Allocates a new UserEntity object
 
Method Summary
 void body()
          A method that records statistics, sends entity and shuts down when the simulation finish
 
Methods inherited from class gridsim.GridSim
clock, Clock, finalize, finalizeGridSimulation, getEntityId, GetEntityId, getEntityName, GetEntityName, getEntityName, GetEntityName, getGridInfoServiceEntityId, getGridResourceList, GetGridResourceList, getGridSimShutdownEntityId, getGridStatisticsEntityId, getResourceCharacteristics, GetResourceCharacteristics, getResourceDynamicInfo, GetResourceDynamicInformation, getSimulationCalendar, getSimulationStartDate, GetSimulationStartDate, GridInformationServiceEntityId, gridletCancel, gridletCancel, gridletMove, gridletMove, gridletPause, gridletPause, gridletReceive, GridletReceive, gridletResume, gridletResume, gridletStatus, gridletStatus, gridletSubmit, GridletSubmit, gridletSubmit, gridSimHold, GridSimHold, GridSimShutdownEntityId, GridStatisticsEntityId, init, Init, isNetworked, IsNetworked, receiveEventObject, ReceiveEventObject, receiveEventObject, ReceiveEventObject, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, send, Send, send, Send, send, Send, send, Send, send, Send, send, Send, shutdownGridStatisticsEntity, ShutdownGridStatisticsEntity, shutdownUserEntity, ShutdownUserEntity, Start, startGridSimulation, Stop, stopGridSimulation, TerminateInputOutputEntities, terminateIOEntities
 
Methods inherited from class eduni.simjava.Sim_entity
add_generator, add_param, add_port, clone, get_id, get_name, get_port, get_port, get_stat, run, send_on, set_invisible, set_stat, sim_cancel, sim_completed, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_pause_for, sim_pause_for, sim_pause_until, sim_pause_until, sim_pause, sim_process_for, sim_process_for, sim_process_until, sim_process_until, sim_process, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, sim_wait_for, sim_wait_for, sim_wait_for, sim_wait, sim_waiting, sim_waiting
 
Methods inherited from class Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserEntity

public UserEntity(String name,
                  Experiment expt,
                  double baudRate,
                  long seed,
                  double successiveExperimentDelay,
                  boolean resultDisplay)
           throws Exception
Allocates a new UserEntity object

Parameters:
name - the entity name
expt - an object of Experiment
baudRate - the communication speed
seed - the initial seed
successiveExperimentDelay - the delay between successive experiment
resultDisplay - display Gridlet processing report or not
Throws:
Exception - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
GridSim.init(int, Calendar, boolean, String[], String[], String), Experiment
Pre Condition:
name != null, expt != null, baudRate >= 0.0, seed > 0, successiveExperimentDelay >= 0.0
Post Condition:
$none
Method Detail

body

public void body()
A method that records statistics, sends entity and shuts down when the simulation finish

Overrides:
body in class Sim_entity
Pre Condition:
$none
Post Condition:
$none