-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add hub event, add serialization factory
- Loading branch information
creepid
committed
Mar 29, 2018
1 parent
6235bf1
commit 8f6343b
Showing
6 changed files
with
115 additions
and
7 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
20 changes: 20 additions & 0 deletions
20
.../main/java/net/easysmarthouse/distribution/shared/serialization/SerializationFactory.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 net.easysmarthouse.distribution.shared.serialization; | ||
|
||
import com.hazelcast.nio.serialization.Portable; | ||
import com.hazelcast.nio.serialization.PortableFactory; | ||
import net.easysmarthouse.distribution.shared.Device; | ||
|
||
public class SerializationFactory implements PortableFactory { | ||
|
||
public static final int SERIALIZATION_FACTORY_ID = 1; | ||
|
||
@Override | ||
public Portable create(int classId) { | ||
switch (classId) { | ||
case Device.CLASS_ID: | ||
return new Device(); | ||
default: | ||
return null; | ||
} | ||
} | ||
} |
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