Interface ProtocolHost

All Known Implementing Classes:
FormCalcScriptHandler.FormCalcParser

public interface ProtocolHost
Class ProtocolHost defines the interface by which the CalcParser (FormCalc scripting engine) can access a protocol host whenever it needs to get/put/post url datas.

FormCalc applications need to inform the FormCalc script engine that they are capable of supporting the ProtocolHost interface by invoking the CalcParser.setProtocolHost(ProtocolHost) method.

  • Method Details

    • getUrl

      CalcSymbol getUrl(String sUrl) throws CalcException
      Abstract method to get data from an URL.
      Parameters:
      sUrl - the URL to get.
      Returns:
      a returned CalcSymbol value upon success.
      Throws:
      CalcException
    • putUrl

      CalcSymbol putUrl(String sUrl, String sData, String sEnc) throws CalcException
      Abstract method to put data to an URL.
      Parameters:
      sUrl - the URL to put.
      sData - the data to put.
      sEnc - the encoding to use.
      Returns:
      a returned CalcSymbol value upon success.
      Throws:
      CalcException
    • postUrl

      CalcSymbol postUrl(String sUrl, String sSoapHeader, String sData, String sContentType, String sEnc) throws CalcException
      Abstract method to post data to an URL and get its response.
      Parameters:
      sUrl - the URL to post.
      sSoapHeader - an optional post header.
      sData - the data to post.
      sEnc - the encoding to use.
      Returns:
      a returned CalcSymbol value upon success.
      Throws:
      CalcException