BrokerClient.SetResponseHandler Method (BrokerResponseHandler)

Designates the callback function that should receive responses in the form of objects of the specified type from the service-oriented architecture (SOA) service.


Namespace: Microsoft.Hpc.Scheduler.Session
Assembly: Microsoft.Hpc.Scheduler.Session (in Microsoft.Hpc.Scheduler.Session.dll)

'Usage
Dim instance As BrokerClient(Of TContract)
Dim callback As BrokerResponseHandler(Of TMessage)

instance.SetResponseHandler(callback)

public void SetResponseHandler<TMessage> (
	BrokerResponseHandler<TMessage> callback
)
J# supports the use of generic APIs, but not the declaration of new ones.
JScript does not support generic types or methods.

GenericParameters

TMessage

The type of the response message that you want the callback function to receive. You create a TMessage type by adding a service reference to the Visual Studio project for the client application or by running the svcutil tool.

Parameters

callback

A function that implements the BrokerResponseHandler delegate that you want to designate as the callback function to receive responses from the SOA service.

The default length of time that the callback function waits for responses is the value specified by the serviceOperationTimeout setting in the configuration file used to register the service. If the sessions for your HPC cluster are queued for long periods of time, use the SetResponseHandler(Generic BrokerResponseHandler,Int32), SetResponseHandler(Generic BrokerResponseHandler,String,String,Int32), SetResponseHandler(Generic BrokerResponseStateHandler,Object,Int32), or SetResponseHandler(Generic BrokerResponseStateHandler,String,String,Object,Int32) method to specify the timeout value instead. You may want to increase the value to the sum of the current value of the serviceOperationTimeout setting and the estimated amount of time that sessions are queued.

To designate a callback function that includes a parameter for a state object that you want to pass to the callback function each time it is called, use the SetResponseHandler(Generic BrokerResponseStateHandler,Object), SetResponseHandler(Generic BrokerResponseStateHandler,Object,Int32), or SetResponseHandler(Generic BrokerResponseStateHandler,String,String,Object,Int32) method.

To designate a callback function that receives responses for all called SOA operations, regardless of the type of the object that represents the response messages, use the SetResponseHandler(Generic BrokerResponseHandler) method instead.

Platform Note: This method was introduced in Windows HPC Server 2008 R2 and is not supported in previous versions.


No members of this type are thread safe.

Development Platforms

Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012

Target Platforms

Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, with HPC Pack Client Utilities




Build Date:

2013-04-22
Show: