|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibspan.ecap.merchant.shopdecisions.negotiationpreparation.NegotiationPreparingModule
public class NegotiationPreparingModule
A subsystem responsible for preparing negotiation templates and strategies. Designed as a singleton.
Method Summary | |
---|---|
static NegotiationPreparingModule |
getInstance()
|
NegotiationDescription |
prepareNegotiationDescription(java.lang.String productId)
Synchronously prepares a new negotiation template for the given product. |
void |
productRegistered(java.lang.String productId)
Registers the product for periodic template updates and requests an immediate asynchronous preparation of the first template. |
void |
productWithdrawn(java.lang.String productId)
Withdraws the product from periodic template updates. |
void |
requestNegotiationDescription(java.lang.String productId)
Requests the preparation of a negotiation template for the given product. |
void |
requestNextNegotiationDescription()
Requests the preparation of a negotiation template for the next registered product. |
boolean |
roundFinished()
|
NegotiationDescription |
takeResult()
Performs a blocking receive of a completed task. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static NegotiationPreparingModule getInstance()
NegotiationPreparingModule
.public NegotiationDescription takeResult() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
NegotiationDescription
result
java.lang.InterruptedException
- when the thread has been interrupted while it was waiting
for a result
java.util.concurrent.ExecutionException
- when an exception occurred during the preparation of the negotiation templatepublic NegotiationDescription prepareNegotiationDescription(java.lang.String productId)
productId
- the id of the product for which a negotiation template is to be prepared.
public void requestNegotiationDescription(java.lang.String productId)
takeResult()
method. *
productId
- the product whose template should be preparedpublic void requestNextNegotiationDescription()
takeResult()
method.
public void productRegistered(java.lang.String productId)
productId
- the id of the product to be handledpublic void productWithdrawn(java.lang.String productId)
productId
- the id of the product to be withdrawnpublic boolean roundFinished()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |