Interface IGatewayService
- Namespace
- CheckmateServer.Web.Registration.Gateway.Device
- Assembly
- Geotab.Checkmate.ObjectModel.dll
Interface defining the requirements for a Gateway service that allows jurisdictional related requests.
public interface IGatewayService
Properties
ResilientGatewayInvokerByJurisdiction
Gets the collection of resilient Gateway invokers by jurisdiction.
IDictionary<Jurisdiction, IResilientGatewayInvoker> ResilientGatewayInvokerByJurisdiction { get; }
Property Value
- IDictionary<Jurisdiction, IResilientGatewayInvoker>
IDictionary<TKey, TValue> The resilient Gateway invokers by jurisdiction.
ResilientJurisdictionlessGatewayInvoker
Gets the resilient jurisdictionless Gateway invoker. Used to notify master gateway of server/database jurisdiction.
IResilientGatewayInvoker? ResilientJurisdictionlessGatewayInvoker { get; }
Property Value
- IResilientGatewayInvoker
IResilientGatewayInvoker The resilient Gateway invoker.
Source
Gets the source name of the service.
string Source { get; }
Property Value
Methods
NotifyJurisdictionChangedAsync(Jurisdiction?, Guid?, CancellationToken)
Primary method to notify the Gateway that the MyGeotab jurisdiction has changed.
Task<NotifyJurisdictionChangedResult> NotifyJurisdictionChangedAsync(Jurisdiction? jurisdiction, Guid? clientGuid, CancellationToken cancellationToken = default)
Parameters
jurisdiction
Jurisdiction?The jurisdiction.
clientGuid
Guid?The company ID.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<NotifyJurisdictionChangedResult>
An object representing the notification result.
RegisterClientAsync(Guid?, string?, Jurisdiction?, CancellationToken)
New Gateway client registration call. This will replace current SetorAddClientJurisdiction call.
Task<RegisterClientResult> RegisterClientAsync(Guid? clientGuid, string? databaseName, Jurisdiction? jurisdiction, CancellationToken cancellationToken = default)
Parameters
clientGuid
Guid?The company ID.
databaseName
stringThe database name.
jurisdiction
Jurisdiction?The jurisdiction.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<RegisterClientResult>
An awaitable task indicating the result of type RegisterClientResult.
RegisterDeviceAsync(Jurisdiction?, int?, Guid?, string, CancellationToken)
Primary method to register a device via the Gateway.
Task<RegisterDeviceResult> RegisterDeviceAsync(Jurisdiction? jurisdiction, int? hardwareId, Guid? clientGuid, string reason, CancellationToken cancellationToken = default)
Parameters
jurisdiction
Jurisdiction?The jurisdiction.
hardwareId
int?The hardware ID.
clientGuid
Guid?The company ID.
reason
stringThe reason the device is being registered.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<RegisterDeviceResult>
An object representing the registration result.
SendDeviceRegistrationChecksumAsync(Jurisdiction?, Guid?, string?, CancellationToken)
Primary method to send the device registration states checksum.
Task<DeviceRegistrationChecksumResult> SendDeviceRegistrationChecksumAsync(Jurisdiction? jurisdiction, Guid? clientGuid, string? checksum, CancellationToken cancellationToken = default)
Parameters
jurisdiction
Jurisdiction?The jurisdiction.
clientGuid
Guid?The company ID.
checksum
stringThe checksum.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<DeviceRegistrationChecksumResult>
An awaitable task.
SetOrAddClientJurisdictionAsync(Jurisdiction?, Guid?, CancellationToken)
Primary method to notify the Gateway of the MyGeotab client jurisdiction. This is called upon Database initialization.
Task<SetOrAddClientJurisdictionResult> SetOrAddClientJurisdictionAsync(Jurisdiction? jurisdiction, Guid? clientGuid, CancellationToken cancellationToken = default)
Parameters
jurisdiction
Jurisdiction?The jurisdiction.
clientGuid
Guid?The company ID.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<SetOrAddClientJurisdictionResult>
An awaitable task indicating the result of type SetOrAddClientJurisdictionResult.
UnregisterClientAsync(Guid?, string, CancellationToken)
Primary method to unregister a client via the Gateway.
Task UnregisterClientAsync(Guid? clientGuid, string reason, CancellationToken cancellationToken = default)
Parameters
clientGuid
Guid?The company ID.
reason
stringThe reason the client is being unregistered.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task
A Task<TResult> representing the result of the asynchronous operation.
UnregisterDeviceAsync(int?, Guid?, string, CancellationToken)
Primary method to unregister a device via the Gateway.
Task<UnregisterDeviceResult> UnregisterDeviceAsync(int? hardwareId, Guid? clientGuid, string reason, CancellationToken cancellationToken = default)
Parameters
hardwareId
int?The hardware ID.
clientGuid
Guid?The company ID.
reason
stringThe reason the device is being unregistered.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<UnregisterDeviceResult>
An object representing the unregistration result.