|
Lightweight Bartering Grid | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlbg.simulator.event.EventFactory
public class EventFactory
Event factory.
| Constructor Summary | |
|---|---|
EventFactory(Scenario sc)
Creates a new EventFactory. |
|
| Method Summary | |
|---|---|
Event |
createCompletedTaskEvent(java.lang.String consumer_id,
java.lang.String supplier_id,
Task t,
Resource res)
Creates a CompletedTaskEvent so that target Task, submitted by target Consumer Peer, is completed by target Resource of target Supplier Peer, after the expected Task runtime from now. |
Event |
createFailedTaskEvent(java.lang.String consumer_id,
java.lang.String supplier_id,
Task t,
Resource res)
Creates a FailedTaskEvent so that target Task, submitted by target Consumer Peer, is cancelled by target Resource of target Supplier Peer, between now and the expected Task runtime from now. |
Event |
createJobEvent(UserAgent user,
java.lang.String owner_id)
Creates a SubmittedJobEvent so that target UserAgent submits, at a legal random time from now, a Job to target Peer. |
Event |
createJobEvent(UserAgent user,
java.lang.String owner_id,
long base_time)
Creates a SubmittedJobEvent so that target UserAgent submits, at a legal random time from target base time, a Job to target Peer. |
Event |
createSelfEvent()
Creates a SelfEvent. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EventFactory(Scenario sc)
throws GridException
sc - target Scenario
GridException - if a parameter is illegal| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Object
public Event createJobEvent(UserAgent user,
java.lang.String owner_id)
throws GridException
user - target UserAgentowner_id - target Peer id
GridException - if a parameter is illegal
public Event createJobEvent(UserAgent user,
java.lang.String owner_id,
long base_time)
throws GridException
user - target UserAgentowner_id - target Peer idbase_time - target base time
GridException - if a parameter is illegal
public Event createCompletedTaskEvent(java.lang.String consumer_id,
java.lang.String supplier_id,
Task t,
Resource res)
throws GridException
consumer_id - target Consumer Peer idsupplier_id - target Supplier Peer idt - target Taskres - target Resource
GridException - if a parameter is illegal
public Event createFailedTaskEvent(java.lang.String consumer_id,
java.lang.String supplier_id,
Task t,
Resource res)
throws GridException
consumer_id - target Consumer Peer idsupplier_id - target Supplier Peer idt - target Taskres - target Resource
GridException - if a parameter is illegal
public Event createSelfEvent()
throws GridException
GridException - if a parameter is illegal
|
Lightweight Bartering Grid | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.