Description

This method is used to control the naming convention used for the directory(s) generated by a Receiver. 


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 dirNameConfigs is not found


Runtime Method Signature

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


public void receiverAddDynamicDirNameConfig(String domainName, String receiverName, List<Map> dirNameConfigs)
Java


For example, to create a new file with a name that contains some constant values, timestamp, counter, and attribute reference, configure the file name configuration for DelimitedFileReceiver of Customer Domain as:


List dirNameConfigs = [ 
    ["Constant": "Customer"], ["Constant":"_name"], ["Counter": 10], 
    ["Timestamp": "yyyy-dd-MM"], ["Reference": "#{Customer.lname}"] 
]

engineManual.receiverAddDynamicDirNameConfig("Customer", "DelimitedFileReceiver", dirNameConfigs)


REST/Socket Payload Request

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


{
  "methodName": "receiverAddDynamicDirNameConfig",
  "parameters": {
    "domainName": "Customer",
    "receiverName": "DelimitedFileReceiver",
    "dirNameConfigs": [
        {"Constant" : "Customer"}, {"Constant":"_name"}, {"Counter" : "10"},
        {"Timestamp":"yyyy-dd-MM"}, {"Reference":"#{Customer.lname}"}
    ]
   }
}

REST/Socket Payload Successful Payload Response

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


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