Sorry, we didn't find any relevant articles for you.

Send us your queries using the form below and we will get back to you with a solution.

API Method - ReceiverAddDynamicDirConfig

This method is used to control the directory creation event for a Receiver.

Example: A Reciever can be configured to generate a new directory after every 100 files get generated.

Note: This will only work for Receivers that have dynamic configuration enabled.

Exceptions

The following GenRocket exceptions may be thrown by this method:

  • If the requested domainName is not found.
  • If the requested receiverName is not found.
  • If the requested dirConfig is not found

Runtime Method Signature

Use this method signature when directly accessing the GenRocket binary runtime.

public void receiverAddDynamicDirConfig(String domainName, String receiverName, Map<String, Object> dirConfig)

For example, to create a new directory after every 30 files are generated, configure the directory creation event for DelimitedFileReceiver of Customer Domain as:

Map dirConfig = [ 
    dirConfigEventName : "Constant", dirConfigEventParameters: ["count": 30]
]

engineManual.receiverAddDynamicDirConfig("Customer", "DelimitedFileReceiver", dirConfig)

REST/Socket Payload Request

Use this API JSON request payload when making an API call to the GenRocket REST or Socket Engine.

{
  "methodName": "receiverAddDynamicDirConfig",
  "parameters": {
    "domainName": "Customer",
    "receiverName": "DelimitedFileReceiver",
    "dirConfig": {
        "dirConfigEventName": "Constant",
        "dirConfigEventParameters": {
             "count" : 30
        }
     }
   }
}

REST/Socket Payload Successful Payload Response

The API JSON response payload for this method will be empty.

{
  "responseType": "OK",
  "data": ""
}