|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthings.thinger.service.command.local.LocalCommandResponse
public class LocalCommandResponse
A local command response implementation. This is NOT thread safe!!! This will work only with the other Local implementations.
Version History
EPG - Initial - 10 APR 06
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface things.thinger.service.command.CommandResponse |
---|
CommandResponse.CompletionDisposition, CommandResponse.ResponseState |
Constructor Summary | |
---|---|
LocalCommandResponse(CommandDefinition originalCommandDefinition,
LocalCommander commander)
The Local command response. |
Method Summary | |
---|---|
void |
add(Entity<Receipt> responseItem)
Add a response item. |
void |
dispose()
Dispose of the response, command, or anything else that might be associated with this interaction. |
Receipt |
getFinalReceipt()
Get the final receipt. |
ReceiptList |
getReceiptList()
Get the receipt list. |
CommandResponse.ResponseState |
getState()
Get state of the command response. |
Entity<Receipt> |
next()
Get next available submission. |
AttributeReader |
rollup()
Get a rollup of all the attributes. |
CommandResponse.CompletionDisposition |
validateCompletion(boolean throwReason)
Assuming the response is done, was the reponse well formed per the scheme? |
Entity<Receipt> |
waitResponse(int timeout)
Wait for a submission and then get it. |
AttributeReader |
waitRollup(int timeout)
Wait for the whole transation to be done and then get a rollup of attributes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalCommandResponse(CommandDefinition originalCommandDefinition, LocalCommander commander)
Method Detail |
---|
public CommandResponse.ResponseState getState()
getState
in interface CommandResponse
public CommandResponse.CompletionDisposition validateCompletion(boolean throwReason) throws SystemException
validateCompletion
in interface CommandResponse
throwReason
- If true and the disposition is BAD, it will throw a SystemException for the reason that makes it BAD.
SystemException
public Receipt getFinalReceipt()
getFinalReceipt
in interface CommandResponse
Receipt
public ReceiptList getReceiptList()
getReceiptList
in interface CommandResponse
Receipt
public Entity<Receipt> next() throws SystemException
next
in interface CommandResponse
SystemException
Receipt
,
Entity
public Entity<Receipt> waitResponse(int timeout) throws SystemException
waitResponse
in interface CommandResponse
timeout
- a timeout period in milliseconds. It'll throw a ThingsCodes.SYSTEM_SERVICE_RESPONSE_TIMEOUT SystemException at the end of the timeout. This is a harmless exception and can be safely thrown away. The timeout resolution isn't exact, so don't base any critical timing on it.
SystemException
Receipt
,
Entity
public AttributeReader rollup() throws SystemException
rollup
in interface CommandResponse
SystemException
Receipt
,
Entity
public AttributeReader waitRollup(int timeout) throws SystemException
waitRollup
in interface CommandResponse
timeout
- a timeout period in milliseconds. It'll throw a ThingsCodes.SYSTEM_SERVICE_RESPONSE_TIMEOUT SystemException at the end of the timeout. This is a harmless exception and can be safely thrown away. The timeout resolution isn't exact, so don't base any critical timing on it.
SystemException
Receipt
,
Entity
public void dispose()
dispose
in interface CommandResponse
public void add(Entity<Receipt> responseItem) throws SystemException
SystemException
Receipt
,
Entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |