Compare commits
2 Commits
8a5f1c10e1
...
dev/redkal
Author | SHA1 | Date | |
---|---|---|---|
efdf42c4f2 | |||
4d125f8e46 |
4
pom.xml
4
pom.xml
@@ -4,9 +4,9 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>net.tccn</groupId>
|
<groupId>dev.zhub</groupId>
|
||||||
<artifactId>zhub-client-redkale</artifactId>
|
<artifactId>zhub-client-redkale</artifactId>
|
||||||
<version>0.1.1-dev</version>
|
<version>x.1.1.dev</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn;
|
package dev.zhub;
|
||||||
|
|
||||||
import org.redkale.convert.json.JsonConvert;
|
import org.redkale.convert.json.JsonConvert;
|
||||||
import org.redkale.util.Resourcable;
|
import org.redkale.util.Resourcable;
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn;
|
package dev.zhub;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布订阅 事件
|
* 发布订阅 事件
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn;
|
package dev.zhub;
|
||||||
|
|
||||||
import org.redkale.util.TypeToken;
|
import org.redkale.util.TypeToken;
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn;
|
package dev.zhub;
|
||||||
|
|
||||||
import org.redkale.util.TypeToken;
|
import org.redkale.util.TypeToken;
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn;
|
package dev.zhub;
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn;
|
package dev.zhub;
|
||||||
|
|
||||||
import org.redkale.util.TypeToken;
|
import org.redkale.util.TypeToken;
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn;
|
package dev.zhub;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.redkale.net.AsyncIOGroup;
|
import org.redkale.net.AsyncIOGroup;
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn;
|
package dev.zhub;
|
||||||
|
|
||||||
import org.redkale.boot.Application;
|
import org.redkale.boot.Application;
|
||||||
import org.redkale.boot.NodeServer;
|
import org.redkale.boot.NodeServer;
|
||||||
@@ -8,7 +8,6 @@ import org.redkale.service.Service;
|
|||||||
import org.redkale.util.ResourceEvent;
|
import org.redkale.util.ResourceEvent;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
@@ -1,6 +1,6 @@
|
|||||||
package net.tccn;
|
package dev.zhub;
|
||||||
|
|
||||||
import net.tccn.zhub.ZHubClient;
|
import dev.zhub.client.ZHubClient;
|
||||||
import org.redkale.annotation.Priority;
|
import org.redkale.annotation.Priority;
|
||||||
import org.redkale.cluster.ClusterAgent;
|
import org.redkale.cluster.ClusterAgent;
|
||||||
import org.redkale.cluster.ClusterAgentProvider;
|
import org.redkale.cluster.ClusterAgentProvider;
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn.zhub;
|
package dev.zhub.client;
|
||||||
|
|
||||||
// ================================================== lock ==================================================
|
// ================================================== lock ==================================================
|
||||||
public class Lock {
|
public class Lock {
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn.zhub;
|
package dev.zhub.client;
|
||||||
|
|
||||||
import org.redkale.convert.ConvertColumn;
|
import org.redkale.convert.ConvertColumn;
|
||||||
import org.redkale.service.RetResult;
|
import org.redkale.service.RetResult;
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn.zhub;
|
package dev.zhub.client;
|
||||||
|
|
||||||
public class RpcResult<R> {
|
public class RpcResult<R> {
|
||||||
private String ruk;
|
private String ruk;
|
||||||
@@ -34,7 +34,7 @@ public class RpcResult<R> {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setResult(Object result) {
|
public void setResult(R result) {
|
||||||
this.result = (R) result;
|
this.result = result;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,7 +1,7 @@
|
|||||||
package net.tccn.zhub;
|
package dev.zhub.client;
|
||||||
|
|
||||||
import net.tccn.*;
|
import dev.zhub.*;
|
||||||
import net.tccn.timer.Timers;
|
import dev.zhub.timer.Timers;
|
||||||
import org.redkale.annotation.AutoLoad;
|
import org.redkale.annotation.AutoLoad;
|
||||||
import org.redkale.annotation.ResourceType;
|
import org.redkale.annotation.ResourceType;
|
||||||
import org.redkale.service.Local;
|
import org.redkale.service.Local;
|
||||||
@@ -679,7 +679,7 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
|
|||||||
TypeToken typeToken = rpc.getTypeToken();
|
TypeToken typeToken = rpc.getTypeToken();
|
||||||
if (typeToken.getType() != ((RpcResult<?>) value).getResult().getClass()) {
|
if (typeToken.getType() != ((RpcResult<?>) value).getResult().getClass()) {
|
||||||
Object result = convert.convertFrom(typeToken.getType(), toStr(((RpcResult<?>) value).getResult()));
|
Object result = convert.convertFrom(typeToken.getType(), toStr(((RpcResult<?>) value).getResult()));
|
||||||
((RpcResult<?>) value).setResult(result);
|
((RpcResult<Object>) value).setResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
rpc.setRpcResult((RpcResult) value);
|
rpc.setRpcResult((RpcResult) value);
|
||||||
@@ -725,7 +725,8 @@ public class ZHubClient extends AbstractConsumer implements IConsumer, IProducer
|
|||||||
Rpc<T> rpc = null;
|
Rpc<T> rpc = null;
|
||||||
try {
|
try {
|
||||||
if (v instanceof String) {
|
if (v instanceof String) {
|
||||||
rpc = convert.convertFrom(IType.STRING.getType(), (String) v);
|
rpc = convert.convertFrom(new TypeToken<Rpc<String>>() {
|
||||||
|
}.getType(), (String) v);
|
||||||
} else {
|
} else {
|
||||||
rpc = (Rpc<T>) v;
|
rpc = (Rpc<T>) v;
|
||||||
}
|
}
|
@@ -1,7 +1,7 @@
|
|||||||
package net.tccn.timer;
|
package dev.zhub.timer;
|
||||||
|
|
||||||
import net.tccn.timer.queue.TimerQueue;
|
import dev.zhub.timer.queue.TimerQueue;
|
||||||
import net.tccn.timer.task.Task;
|
import dev.zhub.timer.task.Task;
|
||||||
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
@@ -1,8 +1,8 @@
|
|||||||
package net.tccn.timer;
|
package dev.zhub.timer;
|
||||||
|
|
||||||
import net.tccn.timer.scheduled.Scheduled;
|
import dev.zhub.timer.scheduled.Scheduled;
|
||||||
import net.tccn.timer.task.Job;
|
import dev.zhub.timer.task.Job;
|
||||||
import net.tccn.timer.task.Task;
|
import dev.zhub.timer.task.Task;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
@@ -1,6 +1,6 @@
|
|||||||
package net.tccn.timer;
|
package dev.zhub.timer;
|
||||||
|
|
||||||
import net.tccn.timer.scheduled.ScheduledCycle;
|
import dev.zhub.timer.scheduled.ScheduledCycle;
|
||||||
import org.redkale.util.Utility;
|
import org.redkale.util.Utility;
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
@@ -1,6 +1,6 @@
|
|||||||
package net.tccn.timer.queue;
|
package dev.zhub.timer.queue;
|
||||||
|
|
||||||
import net.tccn.timer.task.Task;
|
import dev.zhub.timer.task.Task;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn.timer.scheduled;
|
package dev.zhub.timer.scheduled;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn.timer.scheduled;
|
package dev.zhub.timer.scheduled;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn.timer.scheduled;
|
package dev.zhub.timer.scheduled;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
@@ -1,4 +1,4 @@
|
|||||||
package net.tccn.timer.task;
|
package dev.zhub.timer.task;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author: liangxianyou at 2018/12/8 17:24.
|
* @author: liangxianyou at 2018/12/8 17:24.
|
@@ -1,7 +1,7 @@
|
|||||||
package net.tccn.timer.task;
|
package dev.zhub.timer.task;
|
||||||
|
|
||||||
import net.tccn.timer.TimerExecutor;
|
import dev.zhub.timer.TimerExecutor;
|
||||||
import net.tccn.timer.scheduled.Scheduled;
|
import dev.zhub.timer.scheduled.Scheduled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author: liangxianyou at 2018/8/5 19:32.
|
* @author: liangxianyou at 2018/8/5 19:32.
|
@@ -1 +1 @@
|
|||||||
net.tccn.ZhubProvider
|
dev.zhub.ZhubProvider
|
@@ -1,7 +1,7 @@
|
|||||||
package net.tccn.mq;
|
package net.tccn.mq;
|
||||||
|
|
||||||
import net.tccn.Event;
|
import net.tccn.Event;
|
||||||
import net.tccn.timer.Timers;
|
import dev.zhub.timer.Timers;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.redkale.convert.json.JsonConvert;
|
import org.redkale.convert.json.JsonConvert;
|
||||||
|
|
||||||
|
@@ -27,15 +27,15 @@ public class HelloService implements Service {
|
|||||||
@Resource(name = "vvvvhub2")
|
@Resource(name = "vvvvhub2")
|
||||||
private ZHubClient zhub2;*/
|
private ZHubClient zhub2;*/
|
||||||
|
|
||||||
//private net.tccn.zhub.ZHubClient zhubx = null;
|
//private dev.zhub.client.ZHubClient zhubx = null;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(AnyValue config) {
|
public void init(AnyValue config) {
|
||||||
|
|
||||||
/*CompletableFuture.runAsync(() -> {
|
/*CompletableFuture.runAsync(() -> {
|
||||||
zhubx = new net.tccn.zhub.ZHubClient("127.0.0.1", 1216, "g-dev", "DEV-LOCAL");
|
zhubx = new dev.zhub.client.ZHubClient("127.0.0.1", 1216, "g-dev", "DEV-LOCAL");
|
||||||
//zhubx = new net.tccn.zhub.ZHubClient("47.111.150.118", 6066, "g-dev", "DEV-LOCAL");
|
//zhubx = new dev.zhub.client.ZHubClient("47.111.150.118", 6066, "g-dev", "DEV-LOCAL");
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
// Function<Rpc<T>, RpcResult<R>> fun
|
// Function<Rpc<T>, RpcResult<R>> fun
|
||||||
|
Reference in New Issue
Block a user