|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.deepthought.sidious.greenhouse.Greenhouse
public class Greenhouse
This class represents a greenhouse and its properties.
Field Summary | |
---|---|
private java.util.Collection<Adjustable> |
adjustables
Collection of adjustables |
private Plan |
currentPlan
|
private boolean |
finished
|
private SuperLinkID |
id
The id of this greenhouse. |
private boolean |
interrupted
Boolean that holds interrupt status. |
private static org.apache.commons.logging.Log |
logger
|
private java.util.Collection<Rule> |
rules
Collection of rules |
Constructor Summary | |
---|---|
Greenhouse(SuperLinkID id,
java.util.Collection<Adjustable> adjustables,
java.util.Collection<Rule> rules)
Constructs a new instance of Greenhouse with the specified
id, adjustables, and rules. |
Method Summary | |
---|---|
java.util.Collection<Adjustable> |
getAdjustables()
Returns the adjustables associated with this plan requester. |
Plan |
getCurrentPlan()
Gets the current plan for this greenhouse. |
SuperLinkID |
getID()
Returns the id of this plan requester. |
java.util.Collection<Rule> |
getRules()
Returns the rules associated with this plan requester. |
State |
getState()
Returns the current state of the system from the point of view of this plan requester. |
void |
interrupt()
Method interrupts the thread. |
private boolean |
interrupted()
Returns true if this thread has been interrupted,
false otherwise. |
boolean |
isFinished()
|
void |
run()
Main loop of the Greenhouse. |
void |
setPlan(Plan plan)
Sets the plan on this requester. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log logger
private final SuperLinkID id
private volatile boolean interrupted
private final java.util.Collection<Adjustable> adjustables
private final java.util.Collection<Rule> rules
private boolean finished
private Plan currentPlan
Constructor Detail |
---|
public Greenhouse(SuperLinkID id, java.util.Collection<Adjustable> adjustables, java.util.Collection<Rule> rules)
Greenhouse
with the specified
id, adjustables, and rules.
id
- the id of the greenhouseadjustables
- the adjustables associated with the greenhouserules
- the rules associated with the greenhouseMethod Detail |
---|
public java.util.Collection<Adjustable> getAdjustables()
PlanRequester
getAdjustables
in interface PlanRequester
public java.util.Collection<Rule> getRules()
PlanRequester
getRules
in interface PlanRequester
public State getState()
PlanRequester
getState
in interface PlanRequester
public void run()
run
in interface java.lang.Runnable
Runnable.run()
private boolean interrupted()
true
if this thread has been interrupted,
false
otherwise.
true
if interruptedpublic void interrupt()
public SuperLinkID getID()
PlanRequester
getID
in interface PlanRequester
public void setPlan(Plan plan)
PlanRequester
setPlan
in interface PlanRequester
plan
- the planpublic Plan getCurrentPlan()
public boolean isFinished()
true
if a plan has been deliveredpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |