PreEmptive Protection - DashO v8.1 User Guide

Sending User Defined Data

Most instrumentation message types allow user defined data in the form of key-value pairs to be gathered and sent along with the message. To send this information, specify a customDataSource attribute on the annotation.

PreEmptive Protection - DashO uses the customDataSource to generate code that gathers the key-value pairs at runtime. The customDataSource is a source for a Properties instance, either a field or method. See Specifying Sources and Actions for more information.

@FeatureTick(value="Click", customDataSource="getProperties()")
private void buttonClick(JComponent sender) {
    // ...

// Creates and populates custom properties
private Properties getProperties() {
    Properties props = new Properties();
    props.setProperty("key1", "val1");
    props.setProperty("key2", "val2");
    props.put("numeric", new Integer(934));
    return props;

Note: Previous versions of DashO handled user defined data via a separate PropertySource annotation.

PreEmptive Protection - DashO Version 8.1.0. Copyright © 2017 PreEmptive Solutions, LLC