Class DefaultSLDRegSenderService

  • All Implemented Interfaces:
    DSSenderService

    public class DefaultSLDRegSenderService
    extends java.lang.Object
    implements DSSenderService
    An implementation of the DSSenderService which uses sldReg(part of SAP Agent Host) to deliver data to the SLD. It requires the some properties to be configured in the system: Command which runs sldreg datasupplier.sldreg.exe.cmd=C:/Program Files/SAP/hostctrl/exe/sldreg.exe On linux it may be following datasupplier.reg.exe.cmd=/usr/sap/hostctrl/exe/sldreg Path to the sldreg configuration file. sldreg doesn't cope with white spaces in the path. So please make sure that the path to config file doesn't contain such. datasupplier.sldreg.config.path=C:/sldreg/sldtest.cfg On linux it may be following datasupplier.reg.config.path=/usr/sap/hostctrl/exe/sldtest.cfg Message returned by sldreg when the payload delivery has succeed datasupplier.sldreg.msg.success=Data send status: true
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SLD_REG_CONFIG_PATH
      The Constant SLD_REG_CONFIG_PATH.
      static java.lang.String SLD_REG_EXE_PATH
      The Constant SLD_REG_EXE_PATH.
      static java.lang.String SLD_SEND_SUCCESSFUL_MSG
      The Constant SLD_SEND_SUCCESSFUL_MSG.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String createTempFileWithPayload​(java.lang.String payload)
      Creates the temp file with payload.
      protected java.lang.String getAndCheckThePath​(java.lang.String paramKey)
      Gets the and check the path.
      protected void removePayloadFile​(java.lang.String path)
      Removes the payload file.
      boolean send​(java.lang.String payload)
      Sends payload to the SLD system
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SLD_REG_EXE_PATH

        public static final java.lang.String SLD_REG_EXE_PATH
        The Constant SLD_REG_EXE_PATH.
        See Also:
        Constant Field Values
      • SLD_REG_CONFIG_PATH

        public static final java.lang.String SLD_REG_CONFIG_PATH
        The Constant SLD_REG_CONFIG_PATH.
        See Also:
        Constant Field Values
      • SLD_SEND_SUCCESSFUL_MSG

        public static final java.lang.String SLD_SEND_SUCCESSFUL_MSG
        The Constant SLD_SEND_SUCCESSFUL_MSG.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultSLDRegSenderService

        public DefaultSLDRegSenderService()
    • Method Detail

      • send

        public boolean send​(java.lang.String payload)
                     throws DSSenderException
        Description copied from interface: DSSenderService
        Sends payload to the SLD system
        Specified by:
        send in interface DSSenderService
        Parameters:
        payload - is send to SLD
        Returns:
        the status of send process
        Throws:
        DSSenderException - is SLD command parameter hansn't been find
      • removePayloadFile

        protected void removePayloadFile​(java.lang.String path)
        Removes the payload file.
        Parameters:
        path - the path
      • createTempFileWithPayload

        protected java.lang.String createTempFileWithPayload​(java.lang.String payload)
                                                      throws DSSenderException
        Creates the temp file with payload.
        Parameters:
        payload - the payload
        Returns:
        the string
        Throws:
        DSSenderException - the DS sender exception
      • getAndCheckThePath

        protected java.lang.String getAndCheckThePath​(java.lang.String paramKey)
                                               throws DSSenderException
        Gets the and check the path.
        Parameters:
        paramKey - the param key
        Returns:
        the and check the path
        Throws:
        DSSenderException - the DS sender exception