diff --git a/sdk-abi/src/main/java/org/fisco/bcos/sdk/abi/TypeDecoder.java b/sdk-abi/src/main/java/org/fisco/bcos/sdk/abi/TypeDecoder.java index 2653b51d5..b50ce4d6f 100644 --- a/sdk-abi/src/main/java/org/fisco/bcos/sdk/abi/TypeDecoder.java +++ b/sdk-abi/src/main/java/org/fisco/bcos/sdk/abi/TypeDecoder.java @@ -174,8 +174,8 @@ static Utf8String decodeUtf8String(String input, int offset) { * @param input the staticArray need to be decoded * @param offset the size of the staticArray need to be decoded * @param type the type of the result - * @param length - * @param + * @param length the length of array + * @param the generic type * @return the decoded result */ @SuppressWarnings("unchecked") diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/Channel.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/Channel.java index 3ebdd0603..9a317123e 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/Channel.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/Channel.java @@ -54,8 +54,8 @@ static Channel build(ConfigOption configOption) throws ConfigException { * Add a message handler to handle specific type messages. When one message comes the handler * will be notified, handler.onMessage(ChannleHandlerContext ctx, Message msg) called. * - * @param type - * @param handler + * @param type the type of message + * @param handler the message handler */ void addMessageHandler(MsgType type, MsgHandler handler); @@ -63,7 +63,7 @@ static Channel build(ConfigOption configOption) throws ConfigException { * Add a connect handler, when one connect success, call handler.onConnect(ChannleHandlerContext * ctx)is called * - * @param handler + * @param handler the connect handler */ void addConnectHandler(MsgHandler handler); @@ -71,7 +71,7 @@ static Channel build(ConfigOption configOption) throws ConfigException { * Add a establish handler, when the SDK establishes a connection with the node, call the * handler * - * @param handler + * @param handler the establish handler */ void addEstablishHandler(MsgHandler handler); @@ -79,7 +79,7 @@ static Channel build(ConfigOption configOption) throws ConfigException { * Add a disconnect handler, when one connection disconnect, * handler.onDisconnect(ChannleHandlerContext ctx) is called * - * @param handler + * @param handler disconnect handler */ void addDisconnectHandler(MsgHandler handler); diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/PeerSelectRule.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/PeerSelectRule.java index 8f0149bbb..416626453 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/PeerSelectRule.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/PeerSelectRule.java @@ -22,7 +22,7 @@ public interface PeerSelectRule { /** * PeerSelectRule Customize a rule to select a peer to send message to * - * @param conns + * @param conns the list of connection info * @return the selected peer */ String select(List conns); diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/ResponseCallback.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/ResponseCallback.java index d64225671..55a16ef82 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/ResponseCallback.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/channel/ResponseCallback.java @@ -31,7 +31,7 @@ public abstract class ResponseCallback { /** * OnResponse * - * @param response + * @param response the response from node */ public abstract void onResponse(Response response); diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/config/Config.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/config/Config.java index 9cf0ac7a0..bcc034de9 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/config/Config.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/config/Config.java @@ -33,6 +33,7 @@ public static ConfigOption load(String tomlConfigFile) throws ConfigException { } /** * @param tomlConfigFile the toml configuration file path + * @param cryptoType the type of crypto function * @return ConfigOption the configuration object * @throws ConfigException the configuration exception */ diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/network/Network.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/network/Network.java index 7e5b9e294..4bb30ba89 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/network/Network.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/network/Network.java @@ -31,6 +31,7 @@ public interface Network { * @param configOption the path of the yaml config file * @param handler message handler * @return a Network implementation instance + * @throws ConfigException the configuration exception */ static Network build(ConfigOption configOption, MsgHandler handler) throws ConfigException { return new NetworkImp(configOption, handler); @@ -52,6 +53,7 @@ static Network build(ConfigOption configOption, MsgHandler handler) throws Confi * * @param out the sent message * @param peerIpPort the node to receive the message + * @throws NetworkException the network exception */ void sendToPeer(Message out, String peerIpPort) throws NetworkException; diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/ByteUtils.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/ByteUtils.java index 5f22b4161..06fc2fe18 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/ByteUtils.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/ByteUtils.java @@ -28,7 +28,13 @@ public class ByteUtils { public static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; public static final byte[] ZERO_BYTE_ARRAY = new byte[] {0}; - /** Creates a copy of bytes and appends b to the end of it */ + /** + * Creates a copy of bytes and appends b to the end of it + * + * @param bytes the original bytes + * @param b the appended byte + * @return a appended bytes @ + */ public static byte[] appendByte(byte[] bytes, byte b) { byte[] result = Arrays.copyOf(bytes, bytes.length + 1); result[result.length - 1] = b; @@ -467,6 +473,10 @@ public static byte[] xor(byte[] b1, byte[] b2) { /** * XORs byte arrays of different lengths by aligning length of the shortest via adding zeros at * beginning + * + * @param b1 the first byte array + * @param b2 the second byte array + * @return a byte array contains XORS of b1 and b2 */ public static byte[] xorAlignRight(byte[] b1, byte[] b2) { if (b1.length > b2.length) { @@ -630,7 +640,12 @@ public static byte[] hexStringToBytes(String data) { return Hex.decode(data); } - /** Converts string representation of host/ip to 4-bytes byte[] IPv4 */ + /** + * Converts string representation of host/ip to 4-bytes byte[] IPv4 + * + * @param ip the ip string of host + * @return a 4-bytes byte[] IPv4 + */ public static byte[] hostToBytes(String ip) { byte[] bytesIp; try { @@ -642,7 +657,12 @@ public static byte[] hostToBytes(String ip) { return bytesIp; } - /** Converts 4 bytes IPv4 IP to String representation */ + /** + * Converts 4 bytes IPv4 IP to String representation + * + * @param bytesIp the 4 bytes IPv4 IP + * @return a String representation of the IP + */ public static String bytesToIp(byte[] bytesIp) { StringBuilder sb = new StringBuilder(); @@ -661,6 +681,9 @@ public static String bytesToIp(byte[] bytesIp) { /** * Returns a number of zero bits preceding the highest-order ("leftmost") one-bit interpreting * input array as a big-endian integer value + * + * @param bytes the byte array + * @return the number of leading zeros */ public static int numberOfLeadingZeros(byte[] bytes) { @@ -679,6 +702,11 @@ public static int numberOfLeadingZeros(byte[] bytes) { * input} has not enough bytes return array will be right padded with zero bytes. I.e. if {@code * offset} is higher than {@code input.length} then zero byte array of length {@code len} will * be returned + * + * @param input the input bytes array + * @param offset an offset in {@code input} array to start parsing from + * @param len the length of zero byte array + * @return a fixed bytes array */ public static byte[] parseBytes(byte[] input, int offset, int len) { @@ -696,7 +724,9 @@ public static byte[] parseBytes(byte[] input, int offset, int len) { * thus, result will be right-padded with zero bytes if there is not enough bytes in {@code * input} * + * @param input the input bytes array * @param idx an index of the word starting from {@code 0} + * @return a fixed bytes array */ public static byte[] parseWord(byte[] input, int idx) { return parseBytes(input, 32 * idx, 32); @@ -707,8 +737,10 @@ public static byte[] parseWord(byte[] input, int idx) { * thus, result will be right-padded with zero bytes if there is not enough bytes in {@code * input} * + * @param input the input bytes array * @param idx an index of the word starting from {@code 0} * @param offset an offset in {@code input} array to start parsing from + * @return a fixed bytes array */ public static byte[] parseWord(byte[] input, int offset, int idx) { return parseBytes(input, offset + 32 * idx, 32); diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/Hex.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/Hex.java index 03684631c..10e19d269 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/Hex.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/Hex.java @@ -35,6 +35,7 @@ public static String toHexString(byte[] data, int off, int length) { /** * encode the input data producing a Hex encoded byte array. * + * @param data the input data * @return a byte array containing the Hex encoded data. */ public static byte[] encode(byte[] data) { @@ -44,6 +45,9 @@ public static byte[] encode(byte[] data) { /** * encode the input data producing a Hex encoded byte array. * + * @param data the input byte array + * @param off the offset of the data to be converted + * @param length the length of the data to be converted * @return a byte array containing the Hex encoded data. */ public static byte[] encode(byte[] data, int off, int length) { @@ -61,6 +65,9 @@ public static byte[] encode(byte[] data, int off, int length) { /** * Hex encode the byte data writing it to the given output stream. * + * @param data the byte array + * @param out the output stream + * @throws IOException the I/O exception * @return the number of bytes produced. */ public static int encode(byte[] data, OutputStream out) throws IOException { @@ -70,6 +77,11 @@ public static int encode(byte[] data, OutputStream out) throws IOException { /** * Hex encode the byte data writing it to the given output stream. * + * @param data the byte array + * @param off the offset of the data to be converted + * @param length the length of the data to be converted + * @param out the output stream + * @throws IOException the I/O exception * @return the number of bytes produced. */ public static int encode(byte[] data, int off, int length, OutputStream out) @@ -80,6 +92,7 @@ public static int encode(byte[] data, int off, int length, OutputStream out) /** * decode the Hex encoded input data. It is assumed the input data is valid. * + * @param data the input byte array * @return a byte array representing the decoded data. */ public static byte[] decode(byte[] data) { @@ -97,6 +110,7 @@ public static byte[] decode(byte[] data) { /** * decode the Hex encoded String data - whitespace will be ignored. * + * @param data the input byte array * @return a byte array representing the decoded data. */ public static byte[] decode(String data) { @@ -115,6 +129,9 @@ public static byte[] decode(String data) { * decode the Hex encoded String data writing it to the given output stream, whitespace * characters will be ignored. * + * @param data the input byte array + * @param out the output stream + * @throws IOException the I/O exception * @return the number of bytes produced. */ public static int decode(String data, OutputStream out) throws IOException { diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/HexEncoder.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/HexEncoder.java index c0b468249..e8a595b4b 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/HexEncoder.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/HexEncoder.java @@ -54,6 +54,11 @@ public HexEncoder() { /** * encode the input data producing a Hex output stream. * + * @param data the input byte array + * @param off the offset of the data to be converted + * @param length the length of the data to be converted + * @param out the output stream + * @throws IOException the I/O exception * @return the number of bytes produced. */ public int encode(byte[] data, int off, int length, OutputStream out) throws IOException { @@ -75,6 +80,11 @@ private static boolean ignore(char c) { * decode the Hex encoded byte data writing it to the given output stream, whitespace characters * will be ignored. * + * @param data the input byte array + * @param off the offset of the data to be converted + * @param length the length of the data to be converted + * @param out the output stream + * @throws IOException the I/O exception * @return the number of bytes produced. */ public int decode(byte[] data, int off, int length, OutputStream out) throws IOException { @@ -121,6 +131,9 @@ public int decode(byte[] data, int off, int length, OutputStream out) throws IOE * decode the Hex encoded String data writing it to the given output stream, whitespace * characters will be ignored. * + * @param data the input byte array + * @param out the output stream + * @throws IOException the I/O exception * @return the number of bytes produced. */ public int decode(String data, OutputStream out) throws IOException { diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/Host.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/Host.java index a6c929bc4..77a959edb 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/Host.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/utils/Host.java @@ -21,7 +21,7 @@ /** Verify host and port, and extract host or port from string. */ public class Host { /** - * @param IP + * @param IP the IP string of host * @return true if IP valid IP string otherwise false */ public static boolean validIP(String IP) { @@ -32,7 +32,7 @@ public static boolean validIP(String IP) { } /** - * @param port + * @param port the port string * @return true if port valid IP port otherwise false */ public static boolean validPort(String port) { @@ -47,7 +47,7 @@ public static boolean validPort(String port) { /** * Get ip from IPAndPort string * - * @param IPAndPort + * @param IPAndPort the combine of IP and port string * @return String of IP address */ public static String getIpFromString(String IPAndPort) { @@ -59,7 +59,7 @@ public static String getIpFromString(String IPAndPort) { /** * Get port from IPAndPort string * - * @param IPAndPort + * @param IPAndPort the combine of IP and port string * @return String of port. */ public static String getPortFromString(String IPAndPort) { diff --git a/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/CryptoSuite.java b/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/CryptoSuite.java index 5b3d40635..a206dc655 100644 --- a/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/CryptoSuite.java +++ b/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/CryptoSuite.java @@ -61,7 +61,7 @@ public CryptoSuite(int cryptoTypeConfig, ConfigOption configOption) { /** * init the common crypto implementation according to the crypto type * - * @param cryptoTypeConfig + * @param cryptoTypeConfig the crypto type config number */ public CryptoSuite(int cryptoTypeConfig) { this.cryptoTypeConfig = cryptoTypeConfig; diff --git a/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keypair/CryptoKeyPair.java b/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keypair/CryptoKeyPair.java index cc4a96b96..b06bcb249 100644 --- a/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keypair/CryptoKeyPair.java +++ b/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keypair/CryptoKeyPair.java @@ -72,7 +72,7 @@ public CryptoKeyPair() {} /** * init CryptoKeyPair from the keyPair * - * @param keyPair + * @param keyPair the original keyPair */ public CryptoKeyPair(KeyPair keyPair) { this.keyPair = keyPair; diff --git a/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keystore/P12KeyStore.java b/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keystore/P12KeyStore.java index d236561c0..b4c77aaa0 100644 --- a/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keystore/P12KeyStore.java +++ b/sdk-crypto/src/main/java/org/fisco/bcos/sdk/crypto/keystore/P12KeyStore.java @@ -152,6 +152,11 @@ public static void storeKeyPairWithP12Format( * * @param keyPair the keyPair used to generated the certificate * @param signatureAlgorithm the signature algorithm of the cert + * @throws NoSuchAlgorithmException no such algorithm exception + * @throws CertificateEncodingException error occurs when encoding certificate + * @throws NoSuchProviderException no such provider exception + * @throws InvalidKeyException invalid key exception + * @throws SignatureException generic signature exception * @return the generated self-signed certificate object */ public static X509Certificate generateSelfSignedCertificate( diff --git a/sdk-demo/src/main/java/org/fisco/bcos/sdk/demo/amop/tool/AmopPublisherPrivateFile.java b/sdk-demo/src/main/java/org/fisco/bcos/sdk/demo/amop/tool/AmopPublisherPrivateFile.java index 06e166404..f3327bd15 100644 --- a/sdk-demo/src/main/java/org/fisco/bcos/sdk/demo/amop/tool/AmopPublisherPrivateFile.java +++ b/sdk-demo/src/main/java/org/fisco/bcos/sdk/demo/amop/tool/AmopPublisherPrivateFile.java @@ -27,7 +27,7 @@ public class AmopPublisherPrivateFile { /** * @param args topicName, pubKey1, pubKey2, isBroadcast: true/false, fileName, count, timeout. * if only one public key please fill pubKey2 with null - * @throws Exception + * @throws Exception the exception */ public static void main(String[] args) throws Exception { if (args.length < parameterNum) { diff --git a/sdk-service/src/main/java/org/fisco/bcos/sdk/client/Client.java b/sdk-service/src/main/java/org/fisco/bcos/sdk/client/Client.java index 1bd358421..ccc69248a 100644 --- a/sdk-service/src/main/java/org/fisco/bcos/sdk/client/Client.java +++ b/sdk-service/src/main/java/org/fisco/bcos/sdk/client/Client.java @@ -70,8 +70,10 @@ public interface Client { /** * Build a client instance GroupId is identified, all interfaces are available * - * @param channel - * @param groupId + * @param channel the Channel instance + * @param groupId the group id + * @param groupManagerService the groupManagerService instance + * @param eventResource the eventResource instance * @return a client instance */ static Client build( @@ -139,7 +141,7 @@ static Client build(Channel channel) { /** * Ledger operation: async send transaction * - * @param signedTransactionData + * @param signedTransactionData transaction string * @param callback the callback that will be called when receive the response */ void sendRawTransactionAsync( @@ -148,7 +150,7 @@ void sendRawTransactionAsync( /** * Ledger operation: call contract functions without sending transaction * - * @param transaction + * @param transaction transaction instance * @return Call */ Call call(Transaction transaction); @@ -156,7 +158,7 @@ void sendRawTransactionAsync( /** * Ledger operation: async call contract functions without sending transaction * - * @param transaction + * @param transaction transaction instance * @param callback the callback that will be called when receive the response */ void callAsync(Transaction transaction, RespCallback callback); @@ -164,7 +166,7 @@ void sendRawTransactionAsync( /** * Ledger operation: send raw transaction and get proof * - * @param signedTransactionData + * @param signedTransactionData transaction string * @return a SendTransaction instance */ SendTransaction sendRawTransactionAndGetProof(String signedTransactionData); @@ -172,7 +174,7 @@ void sendRawTransactionAsync( /** * Ledger operation: async send transaction and get proof * - * @param signedTransactionData + * @param signedTransactionData transaction string * @param callback the callback that will be called when receive the response */ void sendRawTransactionAndGetProofAsync( @@ -197,7 +199,7 @@ void sendRawTransactionAndGetProofAsync( /** * Ledger operation: get code * - * @param address + * @param address the address string * @return a code instance */ Code getCode(String address); @@ -205,7 +207,7 @@ void sendRawTransactionAndGetProofAsync( /** * Ledger operation: async get code * - * @param address + * @param address the address string * @param callback the callback that will be called when receive the response */ void getCodeAsync(String address, RespCallback callback); @@ -227,8 +229,8 @@ void sendRawTransactionAndGetProofAsync( /** * Ledger operation: get block by hash * - * @param blockHash - * @param returnFullTransactionObjects + * @param blockHash the hashcode of the block + * @param returnFullTransactionObjects the boolean define the tx is full or not * @return a block */ BcosBlock getBlockByHash(String blockHash, boolean returnFullTransactionObjects); @@ -236,8 +238,8 @@ void sendRawTransactionAndGetProofAsync( /** * Ledger operation: async get block by hash * - * @param blockHash - * @param returnFullTransactionObjects + * @param blockHash the hashcode of the block + * @param returnFullTransactionObjects the boolean define the tx is full or not * @param callback the callback that will be called when receive the response */ void getBlockByHashAsync( @@ -248,8 +250,8 @@ void getBlockByHashAsync( /** * Ledger operation: get block by block number * - * @param blockNumber - * @param returnFullTransactionObjects + * @param blockNumber the number of the block + * @param returnFullTransactionObjects the boolean define the tx is full or not * @return block */ BcosBlock getBlockByNumber(BigInteger blockNumber, boolean returnFullTransactionObjects); @@ -257,8 +259,8 @@ void getBlockByHashAsync( /** * Ledger operation: async get block by block number * - * @param blockNumber - * @param returnFullTransactionObjects + * @param blockNumber the number of the block + * @param returnFullTransactionObjects the boolean define the tx is full or not * @param callback the callback that will be called when receive the response */ void getBlockByNumberAsync( @@ -269,7 +271,7 @@ void getBlockByNumberAsync( /** * Ledger operation: get block hash by block number * - * @param blockNumber + * @param blockNumber the number of the block * @return block hash */ BlockHash getBlockHashByNumber(BigInteger blockNumber); @@ -277,7 +279,7 @@ void getBlockByNumberAsync( /** * Ledger operation: async get block hash by block number * - * @param blockNumber + * @param blockNumber the number of the block * @param callback the callback that will be called when receive the response */ void getBlockHashByNumberAsync(BigInteger blockNumber, RespCallback callback); @@ -285,8 +287,8 @@ void getBlockByNumberAsync( /** * Ledger operation: get block header by block hash * - * @param blockHash - * @param returnSignatureList + * @param blockHash the hashcode of the block + * @param returnSignatureList the boolean define the signature list is returned or not * @return block header */ BcosBlockHeader getBlockHeaderByHash(String blockHash, boolean returnSignatureList); @@ -294,9 +296,9 @@ void getBlockByNumberAsync( /** * Ledger operation: async get block header by block hash * - * @param blockHash - * @param returnSignatureList - * @param callback + * @param blockHash the hashcode of the block + * @param returnSignatureList the boolean define the signature list is returned or not + * @param callback the call back instance */ void getBlockHeaderByHashAsync( String blockHash, boolean returnSignatureList, RespCallback callback); @@ -304,8 +306,8 @@ void getBlockHeaderByHashAsync( /** * get block header by number * - * @param blockNumber - * @param returnSignatureList + * @param blockNumber the number of the block + * @param returnSignatureList the boolean define the signature list is returned or not * @return the block header responsed from the blockchain node */ BcosBlockHeader getBlockHeaderByNumber(BigInteger blockNumber, boolean returnSignatureList); @@ -318,7 +320,7 @@ void getBlockHeaderByNumberAsync( /** * Ledger operation: get trnasaction by hash * - * @param transactionHash + * @param transactionHash the hashcode of transaction * @return transaction */ BcosTransaction getTransactionByHash(String transactionHash); @@ -326,7 +328,7 @@ void getBlockHeaderByNumberAsync( /** * Ledger operation: async get trnasaction by hash * - * @param transactionHash + * @param transactionHash the hashcode of transaction * @param callback the callback that will be called when receive the response */ void getTransactionByHashAsync(String transactionHash, RespCallback callback); @@ -334,7 +336,7 @@ void getBlockHeaderByNumberAsync( /** * Ledger operation: get transaction and proof by hash * - * @param transactionHash + * @param transactionHash the hashcode of transaction * @return transaction with proof */ TransactionWithProof getTransactionByHashWithProof(String transactionHash); @@ -342,7 +344,7 @@ void getBlockHeaderByNumberAsync( /** * Ledger operation: async get transaction and proof by hash * - * @param transactionHash + * @param transactionHash the hashcode of transaction * @param callback the callback that will be called when receive the response */ void getTransactionByHashWithProofAsync( @@ -351,8 +353,8 @@ void getTransactionByHashWithProofAsync( /** * Ledger operation: get transaction by block number and index * - * @param blockNumber - * @param transactionIndex + * @param blockNumber the number of block + * @param transactionIndex the index of transaction * @return transaction */ BcosTransaction getTransactionByBlockNumberAndIndex( @@ -361,8 +363,8 @@ BcosTransaction getTransactionByBlockNumberAndIndex( /** * Ledger operation: async get transaction by block number and index * - * @param blockNumber - * @param transactionIndex + * @param blockNumber the number of block + * @param transactionIndex the index of transaction * @param callback the callback that will be called when receive the response */ void getTransactionByBlockNumberAndIndexAsync( @@ -379,7 +381,7 @@ void getTransactionByBlockHashAndIndexAsync( /** * Ledger operation: get transaction receipt by transaction hash * - * @param transactionHash + * @param transactionHash the hashcode of transaction * @return transaction receipt */ BcosTransactionReceipt getTransactionReceipt(String transactionHash); @@ -387,7 +389,7 @@ void getTransactionByBlockHashAndIndexAsync( /** * Ledger operation: async get transaction receipt by transaction hash * - * @param transactionHash + * @param transactionHash the hashcode of transaction * @param callback the callback that will be called when receive the response */ void getTransactionReceiptAsync( @@ -396,7 +398,7 @@ void getTransactionReceiptAsync( /** * Ledger operation: get transaction receipt and proof by transaction hash * - * @param transactionHash + * @param transactionHash the hashcode of transaction * @return receipt and proof */ TransactionReceiptWithProof getTransactionReceiptByHashWithProof(String transactionHash); @@ -404,7 +406,7 @@ void getTransactionReceiptAsync( /** * Ledger operation: async get transaction receipt and proof by transaction hash * - * @param transactionHash + * @param transactionHash the hashcode of transaction * @param callback the callback that will be called when receive the response */ void getTransactionReceiptByHashWithProofAsync( @@ -448,10 +450,10 @@ void getTransactionReceiptByHashWithProofAsync( /** * Group operation: generate a new group * - * @param groupId - * @param timestamp - * @param enableFreeStorage - * @param nodeList + * @param groupId the group id + * @param timestamp timestamp + * @param enableFreeStorage enable free storage + * @param nodeList give the ip string list of the nodes in the group * @param peerIpPort send to the specific peer * @return generate group reply message */ @@ -465,10 +467,10 @@ GenerateGroup generateGroup( /** * Group operation: async generate a new group * - * @param groupId - * @param timestamp - * @param enableFreeStorage - * @param nodeList + * @param groupId the group id + * @param timestamp timestamp + * @param enableFreeStorage enable free storage + * @param nodeList the list of the nodes in the group * @param peerIpPort send to the specific peer * @param callback the callback that will be called when receive the response */ @@ -483,8 +485,8 @@ void generateGroupAsync( /** * Group operation: start a group * - * @param groupId - * @param peerIpPort + * @param groupId the group id + * @param peerIpPort the node that the request sent to * @return start group rpc reply */ StartGroup startGroup(Integer groupId, String peerIpPort); @@ -492,8 +494,8 @@ void generateGroupAsync( /** * Group operation: async start a group * - * @param groupId - * @param peerIpPort + * @param groupId the group id + * @param peerIpPort the node that the request sent to * @param callback the callback that will be called when receive the response */ void startGroupAsync(Integer groupId, String peerIpPort, RespCallback callback); @@ -501,8 +503,8 @@ void generateGroupAsync( /** * Group operation: stop a group * - * @param groupId - * @param peerIpPort + * @param groupId the group id + * @param peerIpPort the node that the request sent to * @return stop group rpc reply */ StopGroup stopGroup(Integer groupId, String peerIpPort); @@ -510,8 +512,8 @@ void generateGroupAsync( /** * Group operation: async stop a group * - * @param groupId - * @param peerIpPort + * @param groupId the group id + * @param peerIpPort the node that the request sent to * @param callback the callback that will be called when receive the response */ void stopGroupAsync(Integer groupId, String peerIpPort, RespCallback callback); @@ -519,8 +521,8 @@ void generateGroupAsync( /** * Group operation: remove a group * - * @param groupId - * @param peerIpPort + * @param groupId the group id + * @param peerIpPort the node that the request sent to * @return remove group rpc reply */ RemoveGroup removeGroup(Integer groupId, String peerIpPort); @@ -528,8 +530,8 @@ void generateGroupAsync( /** * Group operation: async remove a group * - * @param groupId - * @param peerIpPort + * @param groupId the group id + * @param peerIpPort the node that the request sent to * @param callback the callback that will be called when receive the response */ void removeGroupAsync(Integer groupId, String peerIpPort, RespCallback callback); @@ -537,8 +539,8 @@ void generateGroupAsync( /** * Group operation: recover a group * - * @param groupId - * @param peerIpPort + * @param groupId the group id + * @param peerIpPort the node that the request sent to * @return recover group rpc reply */ RecoverGroup recoverGroup(Integer groupId, String peerIpPort); @@ -546,8 +548,8 @@ void generateGroupAsync( /** * Group operation: async recover a group * - * @param groupId - * @param peerIpPort + * @param groupId the group id + * @param peerIpPort the node that the request sent to * @param callback the callback that will be called when receive the response */ void recoverGroupAsync(Integer groupId, String peerIpPort, RespCallback callback); @@ -555,7 +557,7 @@ void generateGroupAsync( /** * Group operation: query group status * - * @param groupId + * @param groupId the group id * @return group status */ QueryGroupStatus queryGroupStatus(Integer groupId); @@ -563,8 +565,8 @@ void generateGroupAsync( /** * Group operation: query group status * - * @param groupId - * @param peerIpPort + * @param groupId the group id + * @param peerIpPort the node that the request sent to * @return group status */ QueryGroupStatus queryGroupStatus(Integer groupId, String peerIpPort); @@ -572,7 +574,7 @@ void generateGroupAsync( /** * Group operation: async query group status * - * @param groupId + * @param groupId the group id * @param callback the callback that will be called when receive the response */ void queryGroupStatusAsync(Integer groupId, RespCallback callback); @@ -627,7 +629,7 @@ void queryGroupStatusAsync( /** * Group operation: get group peers * - * @param peerIpPort + * @param peerIpPort the target node of the request * @return group peers */ GroupPeers getGroupPeers(String peerIpPort); @@ -665,7 +667,7 @@ void queryGroupStatusAsync( /** * Peer operation: async get connected peers * - * @param callback + * @param callback the callback instance */ void getPeersAsync(RespCallback callback); @@ -681,7 +683,7 @@ void queryGroupStatusAsync( /** * Peer operation: async get node ids * - * @param callback + * @param callback the callback instance */ void getNodeIDListAsync(RespCallback callback); @@ -695,7 +697,7 @@ void queryGroupStatusAsync( /** * Peer operation: async get observer node list * - * @param callback + * @param callback the callback instance */ void getObserverList(RespCallback callback); @@ -709,7 +711,7 @@ void queryGroupStatusAsync( /** * Peer operation: async get sealer node list * - * @param callback + * @param callback the callback instance */ void getSealerListAsync(RespCallback callback); @@ -723,7 +725,7 @@ void queryGroupStatusAsync( /** * Peer operation: async get pbft view * - * @param callback + * @param callback the callback instance */ void getPbftViewAsync(RespCallback callback); @@ -739,7 +741,7 @@ void queryGroupStatusAsync( /** * Peer operation: get node version * - * @param callback + * @param callback the callback instance */ void getNodeVersion(RespCallback callback); @@ -753,14 +755,14 @@ void queryGroupStatusAsync( /** * Peer operation: async get consensus status * - * @param callback + * @param callback the callback instance */ void getConsensusStates(RespCallback callback); /** * Peer operation: get system config * - * @param key + * @param key the string of key * @return system config */ SystemConfig getSystemConfigByKey(String key); @@ -768,8 +770,8 @@ void queryGroupStatusAsync( /** * Peer operation: get system config * - * @param key - * @param peerIpPort + * @param key the string of key + * @param peerIpPort the node that the request sent to * @return system config */ SystemConfig getSystemConfigByKey(String key, String peerIpPort); @@ -777,17 +779,17 @@ void queryGroupStatusAsync( /** * Peer operation: async get system config * - * @param key - * @param callback + * @param key the string of key + * @param callback the callback instance */ void getSystemConfigByKeyAsync(String key, RespCallback callback); /** * Peer operation: async get system config * - * @param key - * @param peerIpPort - * @param callback + * @param key the string of key + * @param peerIpPort the port string of + * @param callback the callback instance */ void getSystemConfigByKeyAsync( String key, String peerIpPort, RespCallback callback); @@ -802,7 +804,7 @@ void getSystemConfigByKeyAsync( /** * Peer operation: async get sync status * - * @param callback + * @param callback the callback instance */ void getSyncStatus(RespCallback callback); diff --git a/sdk-service/src/main/java/org/fisco/bcos/sdk/client/protocol/request/Transaction.java b/sdk-service/src/main/java/org/fisco/bcos/sdk/client/protocol/request/Transaction.java index ad0b34ca5..7c4119461 100644 --- a/sdk-service/src/main/java/org/fisco/bcos/sdk/client/protocol/request/Transaction.java +++ b/sdk-service/src/main/java/org/fisco/bcos/sdk/client/protocol/request/Transaction.java @@ -23,9 +23,9 @@ public class Transaction { private String data; /** - * @param from - * @param to - * @param encodedFunction + * @param from from address + * @param to to address + * @param encodedFunction the string encodedFunction */ public Transaction(String from, String to, String encodedFunction) { super(); diff --git a/sdk-service/src/main/java/org/fisco/bcos/sdk/eventsub/EventLogParams.java b/sdk-service/src/main/java/org/fisco/bcos/sdk/eventsub/EventLogParams.java index 526017562..ce663b884 100644 --- a/sdk-service/src/main/java/org/fisco/bcos/sdk/eventsub/EventLogParams.java +++ b/sdk-service/src/main/java/org/fisco/bcos/sdk/eventsub/EventLogParams.java @@ -218,7 +218,7 @@ && getToBlock().equals(TopicTools.LATEST)) { /** * @param blockNumber: block number of blockchain - * @return + * @return check 3 params */ @SuppressWarnings("unchecked") public boolean checkParams(BigInteger blockNumber) { diff --git a/sdk-service/src/main/java/org/fisco/bcos/sdk/eventsub/EventSubscribe.java b/sdk-service/src/main/java/org/fisco/bcos/sdk/eventsub/EventSubscribe.java index 8da7db636..56b4384e1 100644 --- a/sdk-service/src/main/java/org/fisco/bcos/sdk/eventsub/EventSubscribe.java +++ b/sdk-service/src/main/java/org/fisco/bcos/sdk/eventsub/EventSubscribe.java @@ -29,8 +29,9 @@ public interface EventSubscribe { /** * Create a Event Subscraibe instance * - * @param groupManagerService - * @param groupId + * @param groupManagerService the groupManager Service instance + * @param groupId the id of group + * @param eventResource the eventResource instance * @return EventSubscribe Object */ static EventSubscribe build( @@ -46,8 +47,8 @@ static String newSeq() { /** * Subscribe event * - * @param params - * @param callback + * @param params the EventLogParams instance + * @param callback the EventCallback instance * @return registerId of event */ String subscribeEvent(EventLogParams params, EventCallback callback); @@ -55,8 +56,8 @@ static String newSeq() { /** * Unsubscribe events * - * @param registerID - * @param callback + * @param registerID the ID of register + * @param callback the EventCallback instance */ void unsubscribeEvent(String registerID, EventCallback callback); diff --git a/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupManagerService.java b/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupManagerService.java index 3f6e5c008..450ad0820 100644 --- a/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupManagerService.java +++ b/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupManagerService.java @@ -44,6 +44,7 @@ public interface GroupManagerService { * update the block number information for the specified group * * @param groupId the specified groupId + * @param peerInfo the info of the peers * @param currentBlockNumber the current blockNumber */ void updateBlockNumberInfo(Integer groupId, String peerInfo, BigInteger currentBlockNumber); diff --git a/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupManagerServiceImpl.java b/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupManagerServiceImpl.java index 944e68e87..6e71c3d8c 100644 --- a/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupManagerServiceImpl.java +++ b/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupManagerServiceImpl.java @@ -255,6 +255,7 @@ public void run() { * Get the blockNumber notify message from the AMOP module, parse the package and update the * latest block height of each group * + * @param version the EnumChannelProtocolVersion instance * @param peerIpAndPort Node ip and port * @param blockNumberNotifyMessage the blockNumber notify message */ diff --git a/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupService.java b/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupService.java index 49c26173c..b44bacbd0 100644 --- a/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupService.java +++ b/sdk-service/src/main/java/org/fisco/bcos/sdk/service/GroupService.java @@ -28,6 +28,7 @@ public interface GroupService { * remove node from the group * * @param nodeAddress the ip and port of the removed node + * @return if nodes in the original list that needed to be removed return True, else false. */ boolean removeNode(String nodeAddress); @@ -35,6 +36,7 @@ public interface GroupService { * add nodeInfo to the group * * @param nodeAddress the node ip and port + * @return if nodes in the original list that needed to be inserted return True, else false. */ boolean insertNode(String nodeAddress); diff --git a/sdk-service/src/main/java/org/fisco/bcos/sdk/service/model/BlockNumberMessageDecoder.java b/sdk-service/src/main/java/org/fisco/bcos/sdk/service/model/BlockNumberMessageDecoder.java index 20b5af7a0..1161c2991 100644 --- a/sdk-service/src/main/java/org/fisco/bcos/sdk/service/model/BlockNumberMessageDecoder.java +++ b/sdk-service/src/main/java/org/fisco/bcos/sdk/service/model/BlockNumberMessageDecoder.java @@ -41,7 +41,7 @@ public BlockNumberNotification decode(EnumChannelProtocolVersion version, Messag } /** - * @param message + * @param message the notification message * @return the decoded block number information */ protected BlockNumberNotification decodeByDefault(Message message) { @@ -60,7 +60,7 @@ protected BlockNumberNotification decodeByDefault(Message message) { } /** - * @param message + * @param message the notification message * @return the decoded block number information */ protected BlockNumberNotification decodeV1(Message message) { diff --git a/sdk-transaction/src/main/java/org/fisco/bcos/sdk/transaction/codec/decode/RevertMessageParser.java b/sdk-transaction/src/main/java/org/fisco/bcos/sdk/transaction/codec/decode/RevertMessageParser.java index e3dae29ed..50d03c4e3 100644 --- a/sdk-transaction/src/main/java/org/fisco/bcos/sdk/transaction/codec/decode/RevertMessageParser.java +++ b/sdk-transaction/src/main/java/org/fisco/bcos/sdk/transaction/codec/decode/RevertMessageParser.java @@ -59,7 +59,7 @@ public class RevertMessageParser { /** * Does output start with the code of the Revert method, If so, the output may be error message * - * @param output + * @param output the string of output * @return true/false */ public static boolean isOutputStartWithRevertMethod(String output) {