Raw Context

Dealing with incoming raw data

  • Context Variable: raw
  • Applicable only to FTP

API Interface

//Update this data
void update();

//Split this data using REGEX
String[] split(String regex);

//Convert this data as list of lines separated by \r\n
List<String> lines();

//Convert this data as JSONMap object
JSONMap map();

//Returns a handle to OS File (for uploaded files)
OSFile file();

//Get message properties
String getProperties();

//Loads the external file data into memory (for uploaded files)
void load();

//Delete this raw data
void delete();

//Get unique message id
UUID getId();

//Get raw data state
RawDataState getState();

//Get binary rule (type) name
String getType();

//Copy/Clone this data
RawData copy();

//Get data size in bytes
int getSize();

//Get received protocol port
int getPort();

//Get file name
String getFileName();

//Get received protocol channel [UDP|MQTT|HTTP|COAP|TCP|FCM|LORA|FTP|TFTP|FSF|HTTPUF]
DataChannel getChannel();

//Convert this data as String
String string();

//Get received month
int getMonth();

//Get received year
int getYear();

//Get received hour
int getHour();

//Get received day
int getDay();

//Mark this data as processed
void processed();

//Get file path
String getFilePath();

//Parse this data as JSONObject
JSONObject json();

//Convert this data as URLEncoded name value pairs
Map<String, String> urlEncoded();

//Get received timestamp
Date getReceivedStamp();

//Get platform node id
String getNodeId();

//Get platform node instance id
UUID getNodeUid();

//Get received IP address
String getIpAddress();

//Get raw data as byte array
byte[] getData();

//Check if this data is processed
boolean isProcessed();

//Get received MQTT topic
String getMqttTopic();

//Get received minute
int getMin();

//Get received second
int getSec();

//Get received millisecond
int getMsec();

//Get domain key
String getDomainKey();

//Get device id
String getDeviceId();

//Get device model
String getDeviceModel();

//Get device's firmware version
String getFirmwareVersion();

//Check if it's a binary data
Boolean getBinary();

//Get content-type
String getContentType();

//Get message id
Object getMessageId();

//Get failure reason
String getReason();

//Get message pending queue count at the time of this message arrival
int getSystemQueue();

//Get message type [STANDARD|DOMAIN|GLOBAL|SYSTEM|ORGANIZATION]
MessageType getMessageType();

Documentation

//Create a CSVParser object from this data with default CSVFormat
[Documentation](https://commons.apache.org/proper/commons-csv/user-guide.html)
CSVParser csv();

Documentation

//Create a CSVParser object from this data with a supplied CSVFormat
CSVParser csv(String format);