Interface Connection


  • public interface Connection
    • Method Detail

      • sendMessage

        java.math.BigInteger sendMessage​(java.lang.String _to,
                                         java.lang.String _svc,
                                         java.math.BigInteger _sn,
                                         byte[] _msg)
        Sends the message to a specific network. Only allowed to be called by registered BSHs. _sn : positive for two-way message, zero for one-way message, negative for response
        Parameters:
        _to - String ( Network Address of destination network )
        _svc - String ( name of the service )
        _sn - Integer ( serial number of the message )
        _msg - Bytes ( serialized bytes of Service Message )
        Returns:
        Integer ( network serial number of message )
      • getFee

        java.math.BigInteger getFee​(java.lang.String _to,
                                    boolean _response)
        Gets the fee to the target network _response should be true if it uses positive value for _sn of sendMessage(java.lang.String, java.lang.String, java.math.BigInteger, byte[]). If _to is not reachable, then it reverts. If _to does not exist in the fee table, then it returns zero.
        Parameters:
        _to - String ( BTP Network Address of the destination BMC )
        _response - Boolean ( Whether the responding fee is included )
        Returns:
        Integer (The fee of sending a message to a given destination network )