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

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

C#
public DOFObject waitProvider(
	DOFObjectID objectID,
	IList<DOFInterfaceID> interfaceIDs,
	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.
interfaceIDs
Type: System.Collections.GenericIListDOFInterfaceID
A list of interface identifiers. This must not be null or empty and may not contain null nor 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 identifier and that provides all of the specified interfaces. 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 one of the specified interfaces 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