|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthings.common.tools.Tender<I,O>
public class Tender<I,O>
A tender transaction object. There can be only ONE accept thread, but as many tender threads. The tender threads will lock the tender in turn until they get their response.
Either side can declare the tender healthy or not. If the responder does so, it'll cause the tender to error. Once it is unhealthy, it'll accept no more tenders.
Version History
EPG - Rewrite from anther project - 2 FEB 07
Constructor Summary | |
---|---|
Tender()
|
Method Summary | |
---|---|
I |
accept()
Accept a tendered transaction. |
void |
response(O output)
Respond to a tendered transaction. |
O |
tender(I input)
Tender a transaction. |
void |
unhealthy()
Mark the tender as unhealthy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tender()
Method Detail |
---|
public O tender(I input) throws ThingsException
input
- The input object.
ThingsException
public I accept() throws ThingsException, java.lang.InterruptedException
ThingsException
java.lang.InterruptedException
public void response(O output) throws ThingsException
output
- The response.
ThingsException
public void unhealthy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |