public static interface DOFRequest.Subscribe extends DOFRequest
DOFObject.Provider.subscribe(org.opendof.core.oal.DOFOperation.Provide, org.opendof.core.oal.DOFRequest.Subscribe, org.opendof.core.oal.DOFInterface.Property, int)
via one of the respond
methods.DOFRequest.Get, DOFRequest.Invoke, DOFRequest.Register, DOFRequest.Session, DOFRequest.Set, DOFRequest.Subscribe, DOFRequest.SubscribeGet, DOFRequest.Type
Modifier and Type | Method and Description |
---|---|
void |
respond()
Respond with a result for this request.
|
void |
respond(DOFErrorException exception)
Respond with an error exception for this request.
|
void |
respond(DOFProviderException exception)
Respond with a provider exception for this request.
|
getConnectionState, getObjectID, getRequestorAddress, getRequestorID, getRequestType, getSecurityScope, getTimeRemaining
void respond()
DOFObject.Provider.subscribe(org.opendof.core.oal.DOFOperation.Provide, org.opendof.core.oal.DOFRequest.Subscribe, org.opendof.core.oal.DOFInterface.Property, int)
does not return a value.
However, this method triggers the DOFObject.Provider.get(org.opendof.core.oal.DOFOperation.Provide, org.opendof.core.oal.DOFRequest.Get, org.opendof.core.oal.DOFInterface.Property)
to be called, which does return a value
through DOFRequest.Get.respond(org.opendof.core.oal.DOFValue)
.
Therefore, if one of the respond
methods is not called the request will timeout.
NOTE: Often a call to respond()
should be immediately followed by return
in
order to maintain the execution flow of a native return
statement.DOFRequest.Get
void respond(DOFProviderException exception)
respond(...)
should be immediately followed by return
in
order to maintain the execution flow of a native throw
statement.exception
- The exception. Must not be null.DOFOperation
void respond(DOFErrorException exception)
DOFObject.Provider.subscribe(org.opendof.core.oal.DOFOperation.Provide, org.opendof.core.oal.DOFRequest.Subscribe, org.opendof.core.oal.DOFInterface.Property, int)
:
DOFErrorException.NOT_SUPPORTED
DOFErrorException.TYPE_MISMATCH
DOFErrorException.INSUFFICIENT_RESOURCES
DOFErrorException.TERMINATED
DOFErrorException.REJECTED
DOFErrorException.NOT_FOUND
DOFErrorException.APPLICATION_ERROR
respond(...)
should be immediately followed by return
in
order to maintain the execution flow of a native throw
statement.exception
- The exception. Must not be null.DOFOperation