public static interface DOFObject.SessionOperationListener extends DOFOperation.OperationListener
Modifier and Type | Method and Description |
---|---|
void |
complete(DOFOperation operation,
DOFException exception)
Operation completed.
|
void |
sessionOpen(DOFOperation.Session operation,
DOFProviderInfo providerInfo,
DOFObject session,
DOFException exception)
Process a result.
|
void sessionOpen(DOFOperation.Session operation, DOFProviderInfo providerInfo, DOFObject session, DOFException exception)
operation
- The session operation. This will never be null.providerInfo
- Information about the provider of the result. May be null (in case of exception).session
- The new session object. May be null, if the session failed -- in which case, exception
should be non-null.
NOTE: Use DOFOperation.Session.waitSession(int)
to ensure that the
session object is available. Use DOFSystem.waitProvider(org.opendof.core.oal.DOFInterfaceID, int)
to make sure there's a route to the provider.
NOTE: It is not necessary to call destroy()
on this object. The
library will destroy the object when the session operation completes or is cancelled.exception
- An exception received from the Provider, if any. If null, no exception occurred (the session was
processed normally by the Provider).void complete(DOFOperation operation, DOFException exception)
DOFOperation.Control
response level
includes exceptions, then this method will be passed a DOFErrorException.TERMINATED
exception, which ends the session.complete
in interface DOFOperation.OperationListener
operation
- The operation that has completed. This will never be null.
NOTE: It is possible to extend the time for the operation by calling DOFOperation.setTimeout(int)
.
If an operation is extended, complete() will be called again.exception
- An exception which caused completion of the operation (typically DOFErrorException.TIMEOUT
or DOFException.FAILED
).
If null, the operation completed normally.
NOTE: Normal completion is not the same as "success." Even if the operation completed "normally", the Provider may still have
returned an exception that was received in one of the other methods of this OperationListener.