Skip to content

Commit

Permalink
Merge with the branch 'feature/json-rpc'.
Browse files Browse the repository at this point in the history
  • Loading branch information
Enfernuz committed Feb 1, 2019
2 parents 025d0be + fead87d commit d6f9555
Show file tree
Hide file tree
Showing 953 changed files with 40,138 additions and 3,011 deletions.
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.idea/
target/
*.iml

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
37 changes: 32 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,18 @@
<version>21.0</version>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.0</version>
<scope>provided</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.4</version>
<version>2.9.8</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
Expand All @@ -50,12 +57,17 @@
<version>1.7.25</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.10.0</version>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand All @@ -65,6 +77,14 @@
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
Expand All @@ -79,6 +99,13 @@
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>16.0.2</version>
</dependency>

</dependencies>

<build>
Expand Down
3 changes: 2 additions & 1 deletion rpc-client-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"host": "127.0.0.1",
"port": 5560
},
"serde_protocol": "json",
"auth": {
"mechanism": "CURVE",
"plain": {
Expand All @@ -19,4 +20,4 @@
}
}
}
}
}
97 changes: 97 additions & 0 deletions schema_client-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/Enfernuz/quik-lua-rpc-java-client/schema_client-config.json",
"title": "Схема конфигурации клиента QLua RPC-сервиса",
"description": "Конфигурация клиента QLua RPC-сервиса",
"type": "object",
"properties": {
"address": {
"description": "Адрес точки подключения к QLua RPC-сервису",
"type": "object",
"properties": {
"host": {
"description": "IP-адрес/хост точки подключения к QLua RPC-сервису",
"type": "string",
"minLength": 1
},
"port": {
"description": "Номер порта точки подключения к QLua RPC-сервису",
"type": "number",
"minimum": 0,
"maximum": 65535
}
},
"required": ["host", "port"]
},
"serde_protocol": {
"description": "Протокол сериализации/десериализации сообщений",
"type": "string",
"pattern": "protobuf|json"
},
"auth": {
"description": "Информация об используемом механизме аутентификации соединения",
"type": "object",
"properties": {
"mechanism": {
"description": "Тип механизма аутентификации ZeroMQ",
"type": "string",
"pattern": "NULL|PLAIN|CURVE"
},
"plain": {
"description": "Информация о простом механизме аутентификации соединения (пара 'пользователь/пароль')",
"type": "object",
"properties": {
"username": {
"description": "Пользователь",
"type": "string",
"minLength": 1
},
"password": {
"description": "Пароль",
"type": "string"
}
},
"required": ["username", "password"]
},
"curve": {
"description": "Информация о механизме аутентификации соединения с использованием шифрования",
"type": "object",
"properties": {
"client": {
"description": "Ключевая пара клиента",
"type": "object",
"properties": {
"public": {
"description": "Публичный CURVE-ключ клиента в формате Z85",
"type": "string",
"pattern": "^[0-9a-zA-Z.\\-:+=^!/*?&<>()\\[\\]{\\}@%$#]{40}$"
},
"secret": {
"description": "Приватный CURVE-ключ клиента в формате Z85",
"type": "string",
"pattern": "^[0-9a-zA-Z.\\-:+=^!/*?&<>()\\[\\]{\\}@%$#]{40}$"
}
},
"required": ["public", "secret"]
},
"server": {
"description": "Информация о CURVE-ключе точки подключения",
"type": "object",
"properties": {
"public": {
"description": "Публичный CURVE-ключ точки подключения в формате Z85",
"type": "string",
"pattern": "^[0-9a-zA-Z.\\-:+=^!/*?&<>()\\[\\]{\\}@%$#]{40}$"
}
},
"required": ["public"]
}
},
"required": ["client", "server"]
}
},
"required": ["mechanism"]
}
},
"required": ["address", "serde_protocol", "auth"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.enfernuz.quik.lua.rpc.api;

public final class ClientRpcException extends RpcException {

public ClientRpcException(final String message) {
super(message);
}

public ClientRpcException(final Throwable cause) {
super(cause);
}

public ClientRpcException(final String message, final Throwable cause) {
super(message, cause);
}
}
Loading

0 comments on commit d6f9555

Please sign in to comment.