Interface CallService

  • All Known Implementing Classes:
    CallServiceImpl

    public interface CallService
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME
      The name of CallService.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void executeCall​(java.math.BigInteger _reqId, byte[] _data)
      Executes the requested call message.
      void executeRollback​(java.math.BigInteger _sn)
      Rollbacks the caller state of the request '_sn'.
      java.math.BigInteger sendCallMessage​(java.lang.String _to, byte[] _data, byte[] _rollback)
      Sends a call message to the contract on the destination chain.
    • Method Detail

      • sendCallMessage

        java.math.BigInteger sendCallMessage​(java.lang.String _to,
                                             byte[] _data,
                                             byte[] _rollback)
        Sends a call message to the contract on the destination chain.
        Parameters:
        _to - The BTP address of the callee on the destination chain
        _data - The calldata specific to the target contract
        _rollback - (Optional) The data for restoring the caller state when an error occurred
        Returns:
        The serial number of the request
      • executeRollback

        void executeRollback​(java.math.BigInteger _sn)
        Rollbacks the caller state of the request '_sn'.
        Parameters:
        _sn - The serial number of the previous request
      • executeCall

        void executeCall​(java.math.BigInteger _reqId,
                         byte[] _data)
        Executes the requested call message.
        Parameters:
        _reqId - The request id
        _data - The calldata