IMultiServerService Interface


IMulti Server Service Interface

The base interface class for all multi-server services.

Namespace: Autodesk.Revit.DB.ExternalService
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public interface IMultiServerService : IExternalService

The IMultiServerService type exposes the following members.

Methods
Name Description
Public method CanExecute Implement this to test whether a particular server should be executed.
Public method Execute Implement this method to execute the given server.
(Inherited from IExternalService )
Public method GetDescription Implement this method to return a description of the service.
(Inherited from IExternalService )
Public method GetName Implement this method to return the name of the service.
(Inherited from IExternalService )
Public method GetServiceId Implement this method to return the unique Id of the service.
(Inherited from IExternalService )
Public method GetVendorId Implement this method to return the vendor Id of the service.
(Inherited from IExternalService )
Public method IsValidServer Implement this method to check if the given instance represents a valid server of this service.
(Inherited from IExternalService )
Public method OnServersChanged
(Inherited from IExternalService )
Public method OnServersDisparity
(Inherited from IExternalService )
Top
Remarks

Both a single-server and multi-server service may have more than one server registered for them. The difference between these two kinds is while there can only be one active server at any given time for a single-sever service, there may be a whole set of active servers assigned for a multi-server service.

When a multi-server service gets executed, the framework iterates through the set of currently active servers (application-wide or document-specific depending on the situation) and invokes the service's interface with a CanExecute call. If the service replies the current server cannot be executed, the framework skips it and continues with the next one in the queue. When a server is found it can be executed, the framework calls the service's interface again, this time with the Execute method. Whether the execution loop ends after the first executed server or not is controlled by execution policy, which is supplied for the service upon its registration.

See Also