|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface describing the common behaviors to every producer. This Interface along with the Consumer Interface is designed to enable to easily string "consumption - production" pieces together. It enables to separate the successive operations applied to data so that the developers can concentrate their efforts on the operations themselves and not on how they are to be stringed or how the application will be architectured (distributed producers and consumers, pools, load balancing...) The architecture issues merely appear at deployment time.
Method Summary | |
boolean |
isProductionOver()
Returns true if the production is over, false if not. |
java.lang.Object |
nextItem()
Returns the next item free for consumption. |
boolean |
produceItem()
Produces next item, i.e. marks it as consumable. |
void |
setProductionOver(boolean bool)
Sets a flag that shows whether the production is over. |
boolean |
validateItem(java.lang.Object theItem)
Validates an item, i.e. marks it as having been consumed. |
Method Detail |
public void setProductionOver(boolean bool)
bool
- The boolean value that the flag has to be set on.public boolean isProductionOver()
public java.lang.Object nextItem()
public boolean validateItem(java.lang.Object theItem)
theItem
- The item to be validated.
public boolean produceItem()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |