Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ext {
// integrationTest.mustRunAfter test
allprojects {
group = 'org.fisco-bcos'
version = '0.1.0-SNAPSHOT'
version = '1.0.0-SNAPSHOT'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
Expand Down Expand Up @@ -119,14 +119,14 @@ subprojects {
from sourceSets.main.allSource
}

/*task javadocJar(type: Jar, dependsOn: javadoc) {
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}*/
}
artifacts {
archives jar
archives sourcesJar
//archives javadocJar
archives javadocJar
}
}

Expand Down
11 changes: 10 additions & 1 deletion sdk-abi/src/main/java/org/fisco/bcos/sdk/abi/TypeDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,16 @@ static Utf8String decodeUtf8String(String input, int offset) {
return new Utf8String(new String(bytes, StandardCharsets.UTF_8));
}

/** Static array length cannot be passed as a type. */
/**
* Decode the staticArray Static array length cannot be passed as a type
*
* @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 <T>
* @return the decoded result
*/
@SuppressWarnings("unchecked")
public static <T extends Type> T decodeStaticArray(
String input, int offset, java.lang.reflect.Type type, int length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public Int(BigInteger value) {
/**
* check if value between MIN_INT256 ~ MIN_INT256
*
* @param value
* @param value the value need to be checked
* @return true/false
*/
public boolean validInt(BigInteger value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public Uint(BigInteger value) {
/**
* check if value between 0 ~ MAX_UINT256
*
* @param value
* @param value the value need to be checked
* @return true/false
*/
public boolean validUint(BigInteger value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ContractAbiUtil {
public static final String TYPE_EVENT = "event";

/**
* @param contractAbi
* @param contractAbi the contract abi
* @return the abi definition
*/
public static List<ABIDefinition> getFuncABIDefinition(String contractAbi) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ public String getMethodSignatureAsString() {
}

/**
* method id
* calculate the method id
*
* @param cryptoSuite the crypto suite used for hash calculation
* @return the method id
*/
public String getMethodId(CryptoSuite cryptoSuite) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public ABIDefinitionFactory(CryptoSuite cryptoSuite) {
/**
* load ABI and construct ContractABIDefinition.
*
* @param abi
* @param abi the abi need to be loaded
* @return the contract definition
*/
public ContractABIDefinition loadABI(String abi) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ public String encode() {
/**
* decode this object
*
* @param input the string to be decoded into ABIObject
* @return the decoded ABIObject
*/
public ABIObject decode(String input) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private static ABIObject createObject(
/**
* build ABIObject by raw type name
*
* @param rawType
* @param rawType the rawType of the object
* @return the built ABIObject
*/
public static ABIObject buildRawTypeObject(String rawType) {
Expand Down
18 changes: 9 additions & 9 deletions sdk-amop/src/main/java/org/fisco/bcos/sdk/amop/Amop.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public interface Amop {
/**
* Create a Amop object.
*
* @param channel
* @param config
* @param channel the channel to send/receive message
* @param config the config object
* @return Amop instance
*/
static Amop build(Channel channel, ConfigOption config) {
Expand All @@ -44,15 +44,15 @@ static Amop build(Channel channel, ConfigOption config) {
/**
* Subscribe a normal topic.
*
* @param topicName
* @param topicName the topic name
* @param callback callback is called when receive a msg relate to this topic
*/
void subscribeTopic(String topicName, AmopCallback callback);

/**
* Subscribe a private topic which need verify.
*
* @param topicName
* @param topicName the topic name
* @param privateKeyTool the private key you used to prove your identity.
* @param callback callback is called when receive a msg relate to this topic
*/
Expand All @@ -62,7 +62,7 @@ static Amop build(Channel channel, ConfigOption config) {
* Config a topic which is need verification, after that user can send message to verified
* subscriber.
*
* @param topicName
* @param topicName the topic name
* @param publicKeyTools the public keys of the target organizations that you want to
* communicate with
*/
Expand All @@ -71,22 +71,22 @@ static Amop build(Channel channel, ConfigOption config) {
/**
* Unsubscribe a topic.
*
* @param topicName
* @param topicName the topic name
*/
void unsubscribeTopic(String topicName);

/**
* Send amop msg
*
* @param content
* @param callback
* @param content the sent message
* @param callback the callback that will be called when receive the AMOP response
*/
void sendAmopMsg(AmopMsgOut content, ResponseCallback callback);

/**
* Send amop msg
*
* @param content
* @param content the broadcasted AMOP message
*/
void broadcastAmopMsg(AmopMsgOut content);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public abstract class AmopCallback {
/**
* receiveAmopMsg is called when get a subscribed topic amop msg.
*
* @param msg
* @param msg the received AMOP message
* @return response content
*/
public abstract byte[] receiveAmopMsg(AmopMsgIn msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ public void addPrivateTopicCallback(String topicName, AmopCallback callback) {
topic2Callback.put(addNeedVerifyTopicPrefix(topicName), callback);
}

/** Make sure do not use same name of a normal and a private topic */
/**
* Make sure do not use same name of a normal and a private topic remove the topic
*
* @param topicName the topic name
*/
public void removeTopic(String topicName) {
logger.trace("remove topic, topic:{}", topicName);
String fullName = topicName2FullName.get(topicName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
* @author Maggie
*/
public interface Channel {

/**
* Init channel module
*
* @param configOption config file path.
* @return a channel instance
* @throws ConfigException the configuration exception
*/
static Channel build(ConfigOption configOption) throws ConfigException {
return new ChannelImp(configOption);
Expand Down
7 changes: 3 additions & 4 deletions sdk-core/src/main/java/org/fisco/bcos/sdk/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import com.moandjiezana.toml.Toml;
import java.io.File;
import java.io.IOException;
import org.fisco.bcos.sdk.config.exceptions.ConfigException;
import org.fisco.bcos.sdk.config.model.ConfigProperty;
import org.fisco.bcos.sdk.model.CryptoType;
Expand All @@ -33,9 +32,9 @@ public static ConfigOption load(String tomlConfigFile) throws ConfigException {
return load(tomlConfigFile, CryptoType.ECDSA_TYPE);
}
/**
* @param tomlConfigFile
* @return ConfigOption
* @throws IOException
* @param tomlConfigFile the toml configuration file path
* @return ConfigOption the configuration object
* @throws ConfigException the configuration exception
*/
public static ConfigOption load(String tomlConfigFile, int cryptoType) throws ConfigException {
// Load a toml config file to an java object
Expand Down
14 changes: 7 additions & 7 deletions sdk-core/src/main/java/org/fisco/bcos/sdk/network/Network.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ static Network build(ConfigOption configOption, MsgHandler handler) throws Confi
/**
* Broadcast message
*
* @param out
* @param out the message to broadcast
*/
void broadcast(Message out);

/**
* Send to peer
*
* @param out
* @param peerIpPort
* @param out the sent message
* @param peerIpPort the node to receive the message
*/
void sendToPeer(Message out, String peerIpPort) throws NetworkException;

Expand All @@ -65,28 +65,28 @@ static Network build(ConfigOption configOption, MsgHandler handler) throws Confi
/**
* Start connect peers
*
* @throws NetworkException
* @throws NetworkException start the network exceptioned
*/
void start() throws NetworkException;

/**
* Get available connection context
*
* @return Map<String, ChannelHandlerContext> String for the IP:Port of a peer
* @return the map between the peer endpoint and the channelHandlerContext
*/
Map<String, ChannelHandlerContext> getAvailableConnections();

/**
* Remove the connection if version negotiation failed
*
* @param peerIpPort
* @param peerIpPort the peer connection to be removed
*/
void removeConnection(String peerIpPort);

/**
* Set thread pool
*
* @param threadPool
* @param threadPool the threadpool to handle the network message
*/
void setMsgHandleThreadPool(ExecutorService threadPool);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class AmopPublisher {
/**
* @param args topicName, isBroadcast, Content(Content you want to send out), Count(how many msg
* you want to send out)
* @throws Exception
* @throws Exception AMOP publish exceptioned
*/
public static void main(String[] args) throws Exception {
if (args.length < parameterNum) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class AmopPublisherFile {
.getPath();

/**
* @param args topicName, isBroadcast: true/false, fileName, count, timeout
* @throws Exception
* @param args topicName, isBroadcast: true/false, fileName, count
* @throws Exception AMOP publish exceptioned
*/
public static void main(String[] args) throws Exception {
if (args.length < parameterNum) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class AmopPublisherPrivate {
/**
* @param args topicName, pubKey1, pubKey2, isBroadcast: true/false, content, count. if only one
* public key please fill pubKey2 with null
* @throws Exception
* @throws Exception AMOP exceptioned
*/
public static void main(String[] args) throws Exception {
if (args.length < parameterNum) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class AmopSubscriberPrivate {

/**
* @param args topic, privateKeyFile, password(Option)
* @throws Exception
* @throws Exception AMOP exceptioned
*/
public static void main(String[] args) throws Exception {
if (args.length < 2) {
Expand Down
Loading