flowsim.slatr
Class UserImpl
java.lang.Object
|
+--flowsim.slatr.UserImpl
- Direct Known Subclasses:
- FTPUser, SLATUser, UserVoice
- public abstract class UserImpl
- extends java.lang.Object
- implements flowsim.slatr.User, Service
Generic/common User implementation.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
s
protected final Simulator s
node
protected final Node node
port
protected final int port
budget
protected long budget
budget_incr
protected long budget_incr
max_utility
protected float max_utility
utility
protected float utility
UserImpl
public UserImpl(Simulator s,
Node node,
int port,
long budget,
long budget_incr)
- Parameters:
s
- simulator object.node
- node where the user resides.port
- port where the user resides.budget
- initial budget.budget_incr
- budget increase pro second.- See Also:
User
get_node
public Node get_node()
- Specified by:
- get_node in interface Service
get_port
public int get_port()
- Specified by:
- get_port in interface Service
get_budget
public long get_budget()
- Specified by:
- get_budget in interface flowsim.slatr.User
get_budget_incr
public long get_budget_incr()
- returns by how much the budget is increased per second.
- Specified by:
- get_budget_incr in interface flowsim.slatr.User
get_max_utility
public final float get_max_utility()
- Specified by:
- get_max_utility in interface flowsim.slatr.User
get_utility
public final float get_utility()
- Specified by:
- get_utility in interface flowsim.slatr.User
add_to_budget
public void add_to_budget(long money)
- Specified by:
- add_to_budget in interface flowsim.slatr.User
remove_from_budget
public void remove_from_budget(long money)
- Specified by:
- remove_from_budget in interface flowsim.slatr.User
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
print_stats
public void print_stats()
- Specified by:
- print_stats in interface flowsim.slatr.User