DOFSystemwaitProvider Method (DOFObjectID, DOFInterfaceID, Int32)OpenDOF Object Access Library
Used by a Requestor to block the caller and wait until a provider becomes available with a matching object identifier and that provides the specified interface.

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public DOFObject waitProvider(
	DOFObjectID objectID,
	DOFInterfaceID interfaceID,
	int timeout
)

Parameters

objectID
Type: org.opendof.core.oalDOFObjectID
The object identifier. This must not be null and must not be multicast. The Broadcast ID may be used to indicate the first available provider should be returned.
interfaceID
Type: org.opendof.core.oalDOFInterfaceID
The interface identifier. This must not be null and must be a specific interface ID (not the Wildcard ID).
timeout
Type: SystemInt32
Maximum time to wait, in milliseconds, for the provider to become available. Must be >= 0.

Return Value

Type: DOFObject
A matching DOFObject that must be destroyed when no longer needed.
Exceptions

ExceptionCondition
DOFErrorExceptionIf the provider cannot be returned in the time specified.
DOFErrorException
Remarks

Used by a Requestor to block the caller and wait until a provider becomes available with a matching object identifier and that provides the specified interface. The returned provider object must be destroyed by calling destroy when no longer needed.

Query logic says once a matching binding is found, all interfaces for the matching object will be returned. This is a convenience method for setting up your own QueryOperationListener . Since it is a blocking call, only one value is returned. Therefore, only the first provide that matches the specified interface is returned.

waitProvider uses the same logic as MatchStyle.AT_LEAST unless DOFObjectID.BROADCAST is passed. In that case, MatchStyle.BASE is used.

NOTE: An application must first express interest by calling beginInterest(DOFObjectID, DOFInterestLevel) . Interest goes out on the network and looks for matching providers.

See Also

Reference