-
-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f54d8dc
commit 9dc1581
Showing
10 changed files
with
184 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
xupdate-lib/src/main/java/com/xuexiang/xupdate/listener/IUpdateParseCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.xuexiang.xupdate.listener; | ||
|
||
import com.xuexiang.xupdate.entity.UpdateEntity; | ||
|
||
/** | ||
* 异步解析的回调 | ||
* | ||
* @author xuexiang | ||
* @since 2020-02-15 17:23 | ||
*/ | ||
public interface IUpdateParseCallback { | ||
|
||
/** | ||
* 解析结果 | ||
* | ||
* @param updateEntity | ||
*/ | ||
void onParseResult(UpdateEntity updateEntity); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
xupdate-lib/src/main/java/com/xuexiang/xupdate/proxy/impl/AbstractUpdateParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.xuexiang.xupdate.proxy.impl; | ||
|
||
import com.xuexiang.xupdate.listener.IUpdateParseCallback; | ||
import com.xuexiang.xupdate.proxy.IUpdateParser; | ||
|
||
/** | ||
* 默认是使用同步解析器,因此异步解析方法不需要实现 | ||
* | ||
* @author xuexiang | ||
* @since 2020-02-15 17:56 | ||
*/ | ||
public abstract class AbstractUpdateParser implements IUpdateParser { | ||
|
||
@Override | ||
public void parseJson(String json, IUpdateParseCallback callback) throws Exception { | ||
//当isAsyncParser为 true时调用该方法 | ||
} | ||
|
||
@Override | ||
public boolean isAsyncParser() { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters