IMultiServerService
The base interface class for all multi-server services.
Namespace: Autodesk.Revit.DB.ExternalService
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.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
Implement this method to handle situations when servers for the service have changed.
(Inherited from IExternalService)
Public Method
OnServersDisparity
Implements this method to get notified that the servers in a just opened document differ from those currently set as active for the service.
(Inherited from IExternalService)
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.