Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaodx committed Jun 8, 2018
1 parent 1a2e2d5 commit f334edf
Show file tree
Hide file tree
Showing 18 changed files with 77 additions and 64 deletions.
7 changes: 1 addition & 6 deletions fpnn-lib/src/main/java/com/fpnn/FPClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

public class FPClient {

public interface IAnswer {

void sendAnswer(Object payload, boolean exception);
}

public interface IKeyData {

FPData getKeyData(FPEncryptor encryptor);
Expand Down Expand Up @@ -412,7 +407,7 @@ private void pushService(FPData quest) {

final FPClient self = this;
final FPData fQuest = quest;
this._psr.service(quest, new IAnswer() {
this._psr.service(quest, new FPProcessor.IAnswer() {

@Override
public void sendAnswer(Object payload, boolean exception) {
Expand Down
11 changes: 8 additions & 3 deletions fpnn-lib/src/main/java/com/fpnn/FPProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@

public class FPProcessor {

public interface IAnswer {

void sendAnswer(Object payload, boolean exception);
}

public interface IProcessor {

void service(FPData data, FPClient.IAnswer answer);
void service(FPData data, IAnswer answer);

void onSecond(long timestamp);
}
Expand All @@ -30,7 +35,7 @@ public void setProcessor(IProcessor processor) {
this._processor = processor;
}

public void service(FPData data, FPClient.IAnswer answer) {
public void service(FPData data, IAnswer answer) {

if (this._processor == null) {

Expand All @@ -39,7 +44,7 @@ public void service(FPData data, FPClient.IAnswer answer) {
this._processor = new IProcessor() {

@Override
public void service(FPData data, FPClient.IAnswer answer) {
public void service(FPData data, IAnswer answer) {

if (data.getFlag() == 0) {

Expand Down
2 changes: 1 addition & 1 deletion fpnn-lib/src/main/java/com/fpnn/callback/FPCallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void addCallback(String key, FPCallback.ICallback callback, int timeout)
synchronized (this._exMap) {

int ts = timeout <= 0 ? FPConfig.SEND_TIMEOUT : timeout;
long expire = ts + Calendar.getInstance().getTimeInMillis();
long expire = ts + System.currentTimeMillis();
this._exMap.put(key, expire);
}
}
Expand Down
109 changes: 61 additions & 48 deletions test-app/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions test-main/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified test-main/out/production/main/com/fpnn/FPClient$1.class
Binary file not shown.
Binary file modified test-main/out/production/main/com/fpnn/FPClient$2.class
Binary file not shown.
Binary file modified test-main/out/production/main/com/fpnn/FPClient$3.class
Binary file not shown.
Binary file modified test-main/out/production/main/com/fpnn/FPClient$4.class
Binary file not shown.
Binary file modified test-main/out/production/main/com/fpnn/FPClient$5.class
Binary file not shown.
Binary file not shown.
Binary file modified test-main/out/production/main/com/fpnn/FPClient.class
Binary file not shown.
Binary file modified test-main/out/production/main/com/fpnn/FPProcessor$1.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified test-main/out/production/main/com/fpnn/FPProcessor.class
Binary file not shown.
Binary file modified test-main/out/production/main/com/fpnn/SyncCallbak.class
Binary file not shown.
Binary file modified test-main/out/production/main/com/fpnn/callback/FPCallback.class
Binary file not shown.

0 comments on commit f334edf

Please sign in to comment.