com.ibm.tivoli.maximo.iotservices

Class IoTMessageParser

  • java.lang.Object
    • com.ibm.tivoli.maximo.iotservices.IoTMessageParser
  • All Implemented Interfaces:
    IoTServicesConstants


    public class IoTMessageParser
    extends java.lang.Object
    implements IoTServicesConstants
    Merge resource processer. Merges records retrieved from a json resource into a target Mboset.
    • Constructor Detail

      • IoTMessageParser

        public IoTMessageParser(java.lang.String serviceName)
                         throws MXException,
                                java.rmi.RemoteException
        Process historian data to show it in the IoT Service.
        Parameters:
        owner - The owner mbo of the targetSet.
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • parseMessage

        public MboSetRemote parseMessage(byte[] jsonData,
                                         UserInfo userInfo)
                                  throws MXException,
                                         java.rmi.RemoteException
        Parse the provided JSON and return a set of the parsed values. Check the IoTServicesCache to see if the values are specified in a name/value pair.
        Parameters:
        jsonData - a byte array of the message to parse
        userInfo - UserInfo for the current user
        Returns:
        MboSetRemote that includes the parsed values
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • parseMessage

        public MboSetRemote parseMessage(byte[] jsonData,
                                         MboSetRemote objectSet)
                                  throws MXException,
                                         java.rmi.RemoteException
        Parse the provided JSON and return a set of the parsed values. This method is used with IBM IoT.
        Parameters:
        jsonData - a byte array of the message to parse
        Returns:
        MboSetRemote that includes the parsed values
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • parseMessage

        public MboSetRemote parseMessage(byte[] jsonData,
                                         MboSetRemote objectSet,
                                         java.lang.String nameTag)
                                  throws MXException
        Parse the provided JSON byte array and return a set of the parsed values. Use the value provided in the nameTag argument to locate the values. The byte array may represent a JSONObject or JSONArray, but only the root level is parsed.
        Parameters:
        jsonData - a byte array of the message to parse
        Returns:
        MboSetRemote that includes the parsed values
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception
      • validateProperty

        public boolean validateProperty(byte[] jsonData,
                                        UserInfo userInfo,
                                        java.lang.String value)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method will process historian request
        Parameters:
        pageSize - Page size if paging is used
        pageNum - Current page
        Returns:
        JSON from external resource invocation
        Throws:
        MXException - MAXIMO exception
        java.rmi.RemoteException - Remote exception