BrokerClient.SetResponseHandler Method (BrokerResponseStateHandler, String, String, Object, Int32)

Designates the callback function that should receive responses in the form of objects of the specified type from the service-oriented architecture (SOA) service, along with a state object that you want to pass to the callback function each time it is called and the SOAP actions for the request and responses, subject to the specified timeout period.


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 BrokerResponseStateHandler(Of TMessage)
Dim action As String
Dim replyAction As String
Dim state As Object
Dim timeoutMilliseconds As Integer

instance.SetResponseHandler(callback, action, replyAction, state, timeoutMilliseconds)

public void SetResponseHandler<TMessage> (
	BrokerResponseStateHandler<TMessage> callback,
	string action,
	string replyAction,
	Object state,
	int timeoutMilliseconds
)
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 BrokerResponseStateHandler delegate that you want to designate as the callback function to receive responses from the SOA service.

action

String that specifies a SOAP action for the request message if the appropriate action cannot be derived from the type of the request message. SOAP actions are defined in the .wdsl file that is created when you add a service reference to the Visual Studio project for the client application or by running the svcutil tool.

replyAction

String that specifies a SOAP action for the response message if the appropriate action cannot be derived from the type of the response message. SOAP actions are defined in the .wdsl file that is created when you add a service reference to the Visual Studio project for the client application or by running the svcutil tool.

state

A state object that you want to pass to the callback function each time it is called. The function that the callback parameter specifies must include a parameter for this object. You can use this object to pass the instance of the BrokerClient class or other state information to the callback function.

timeoutMilliseconds

Integer that specifies the length of time in milliseconds that the callback function should wait between successive responses or for an indicator that no more responses will be sent generating an exception.

Exception typeCondition
TimeoutException

The callback function reached the end of the specified timeout period before receiving a new response or an indicator that no more responses will be sent.

If the sessions for your HPC cluster are queued for long periods of time, 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 use the default timeout period specified by the serviceOperationTimeout setting in the configuration file used to register the service, use the SetResponseHandler(Generic BrokerResponseStateHandler,Object) or 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: