-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from tvd12/master
release version 1.1.3
- Loading branch information
Showing
4 changed files
with
38 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
**version 1.1.3** | ||
|
||
- Add serialize and deserialize features, example: | ||
|
||
public class BetRequestSerializer implements ObjectSerializer { | ||
|
||
@Override | ||
public Parameters serialize(Object object) { | ||
BetRequestListener bet = (BetRequestListener)object; | ||
Parameters answer = new ParameterWrapper(); | ||
answer.set("1", bet.getBettingTypeId()); | ||
return answer; | ||
} | ||
|
||
} | ||
|
||
public class BetRequestDeserializer implements ObjectDeserializer { | ||
|
||
@SuppressWarnings("unchecked") | ||
@Override | ||
public BetRequestListener deserialize(Object object, Parameters params) { | ||
BetRequestListener bet = (BetRequestListener)object; | ||
bet.setBettingTypeId(params.get("1", int.class)); | ||
return bet; | ||
} | ||
|
||
} | ||
|
||
context.command(AddObjectSerializer.class) | ||
.add(BetRequestListener.class, new BetRequestSerializer()); | ||
context.command(AddObjectDeserializer.class) | ||
.add(BetRequestDeserializer.class, new BetRequestDeserializer()); |
Submodule ezyfox-core
updated
94 files
Submodule ezyfox-sfs2x
updated
43 files