Infront Data Manager Connect Client (.NET)

Public Member Functions | List of all members
Gevasys.DataCore.StaticData.Http.RoutingDataStore Class Reference

Manages a primary and a backup routing data consumer. More...

Inherits Gevasys.DataCore.StaticData.IRoutingDataStore.

## Public Member Functions
| RoutingDataStore (IRoutingDataConsumer primaryConsumer, IRoutingDataConsumer secondaryConsumer)
| Default constructor. More...
bool | Initialize ()
| Initialize the data store. More...
void | Stop ()
| Stops the data store. More...
void | Start ()
| Starts the data store. More...
StaticDataResponse | CallFunction (String functionName, String inputFormat, String outputFormat, byte[] postData)
| Synchronous call of a static data function. More...
bool | DownloadFile (String requestedFileName, String outputFileName)
| Synchronous file download. More...
void | DownloadFileAsync (String requestedFileName, String outputFileName, IAsyncCallback callback, Object userState)
| Asynchronous file download. More...
String | GetAuthToken ()
| Gets the default authorization token. More...
void | CallFunctionAsync (String functionName, String inputFormat, String outputFormat, byte[] postData, IAsyncRouteCallback callback, Object userState)
| Asynchrounus calls a static data function. More...
bool | GetIsAlive ()

## Detailed Description

Manages a primary and a backup routing data consumer.

ConfigurationHelper configHelper = new ConfigurationHelper();
if (configHelper.ReadConfiguration(configFileName))
{
//Create a RoutingDataStore as defined in the configuration file.
RoutingDataStore routingStore = configHelper.CreateConfiguredRoutingDataStore("RDC1");
//Download a file.
routingStore.DownloadFileAsync("TestFile.txt", "C:\\TestFile.txt", this, null);
//Request the index composition for the DAX index.
IndexCompositionRequestMessage requestMessage = new IndexCompositionRequestMessage();
requestMessage.header = new RequestHeaderMessage();
requestMessage.header.user = Authentication.GetUser();
requestMessage.header.password = Authentication.GetPassword();
requestMessage.header.sourceTarget = SourceTargetType.SOURCE_TARGET_DMC;
requestMessage.addQuotes = false;
requestMessage.vwdCode = "846900.ETR";
MessageSerializer serializer = new MessageSerializer();
routingStore.CallFunctionAsync("INDEX_COMPOSITION", "PROTO", "PROTO", serializer.Serialize<IndexCompositionRequestMessage>(OutputFormat.PROTO, requestMessage), this, "INDEX_COMPOSITION");
}

## Constructor & Destructor Documentation

## ◆ RoutingDataStore()

Gevasys.DataCore.StaticData.Http.RoutingDataStore.RoutingDataStore | ( | IRoutingDataConsumer | primaryConsumer,
|  | IRoutingDataConsumer | secondaryConsumer
| ) |  |
| inline

Default constructor.

Parameters

  primaryConsumer | Primary routing data consumer.
  secondaryConsumer | Backup routing data consumer.

## Member Function Documentation

## ◆ CallFunction()

StaticDataResponse Gevasys.DataCore.StaticData.Http.RoutingDataStore.CallFunction | ( | String | functionName,
|  | String | inputFormat,
|  | String | outputFormat,
|  | byte[] | postData
| ) |  |
| inline

Synchronous call of a static data function.

Parameters

  functionName | Function name. See Request Server documentation.
  inputFormat | Data format of the input message(PROTO, JSON, XML)
  outputFormat | Data format of the output message(PROTO, JSON, XML)
  postData | Serialized message data.

Returns
  True if the call was successfull, otherwise false.

## ◆ CallFunctionAsync()

void Gevasys.DataCore.StaticData.Http.RoutingDataStore.CallFunctionAsync | ( | String | functionName,
|  | String | inputFormat,
|  | String | outputFormat,
|  | byte[] | postData,
|  | IAsyncRouteCallback | callback,
|  | Object | userState
| ) |  |
| inline

Asynchrounus calls a static data function.

Parameters

  functionName | Function name. See Request Server documentation.
  inputFormat | Data format of the input message(PROTO, JSON, XML)
  outputFormat | Data format of the output message(PROTO, JSON, XML)
  postData | Serialized message data.
  callback | Callback function.
  userState | Optional user defined object that is returned in the callback function.

## ◆ DownloadFile()

bool Gevasys.DataCore.StaticData.Http.RoutingDataStore.DownloadFile | ( | String | requestedFileName,
|  | String | outputFileName
| ) |  |
| inline

Synchronous file download.

Parameters

  requestedFileName | Remote file name.
  outputFileName | Local file name with.

Returns
  True if download was successfull, otherwise false.

## ◆ DownloadFileAsync()

void Gevasys.DataCore.StaticData.Http.RoutingDataStore.DownloadFileAsync | ( | String | requestedFileName,
|  | String | outputFileName,
|  | IAsyncCallback | callback,
|  | Object | userState
| ) |  |
| inline

Asynchronous file download.

Parameters

  requestedFileName | Remote file name.
  outputFileName | Local file name with.
  callback | Callback function. Funciton is called after the the download completed or failed.
  userState | Optional user defined object.

## ◆ GetAuthToken()

String Gevasys.DataCore.StaticData.Http.RoutingDataStore.GetAuthToken | ( |  | ) |
| inline

Gets the default authorization token.

Returns

## ◆ Initialize()

bool Gevasys.DataCore.StaticData.Http.RoutingDataStore.Initialize | ( |  | ) |
| inline

Initialize the data store.

Returns

## ◆ Start()

void Gevasys.DataCore.StaticData.Http.RoutingDataStore.Start | ( |  | ) |
| inline

Starts the data store.

## ◆ Stop()

void Gevasys.DataCore.StaticData.Http.RoutingDataStore.Stop | ( |  | ) |
| inline

Stops the data store.

The documentation for this class was generated from the following file:

- RoutingDataStore.cs

Gevasys.DataCore.StaticData.Http.RoutingDataStore.RoutingDataStore
RoutingDataStore(IRoutingDataConsumer primaryConsumer, IRoutingDataConsumer secondaryConsumer)
Default constructor.
Definition: RoutingDataStore.cs:46

Copyright (C) 2021 Infront Financial Technology GmbH
Mainzer Landstrasse 178 – 190
60327 Frankfurt am Main
Infront Data Manager Connect V4.1