Class DefaultSLDRegSenderService
- java.lang.Object
-
- de.hybris.datasupplier.services.impl.DefaultSLDRegSenderService
-
- All Implemented Interfaces:
DSSenderService
public class DefaultSLDRegSenderService extends java.lang.Object implements DSSenderService
An implementation of theDSSenderServicewhich 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.StringSLD_REG_CONFIG_PATHThe Constant SLD_REG_CONFIG_PATH.static java.lang.StringSLD_REG_EXE_PATHThe Constant SLD_REG_EXE_PATH.static java.lang.StringSLD_SEND_SUCCESSFUL_MSGThe Constant SLD_SEND_SUCCESSFUL_MSG.
-
Constructor Summary
Constructors Constructor Description DefaultSLDRegSenderService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringcreateTempFileWithPayload(java.lang.String payload)Creates the temp file with payload.protected java.lang.StringgetAndCheckThePath(java.lang.String paramKey)Gets the and check the path.protected voidremovePayloadFile(java.lang.String path)Removes the payload file.booleansend(java.lang.String payload)Sends payload to the SLD system
-
-
-
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
-
-
Method Detail
-
send
public boolean send(java.lang.String payload) throws DSSenderExceptionDescription copied from interface:DSSenderServiceSends payload to the SLD system- Specified by:
sendin interfaceDSSenderService- 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 DSSenderExceptionCreates 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 DSSenderExceptionGets the and check the path.- Parameters:
paramKey- the param key- Returns:
- the and check the path
- Throws:
DSSenderException- the DS sender exception
-
-