Package org.teamapps.protocol.schema
Class MessageModelRegistry
java.lang.Object
org.teamapps.protocol.schema.MessageModelRegistry
- All Implemented Interfaces:
ModelRegistry,PojoObjectDecoderRegistry
public class MessageModelRegistry extends java.lang.Object implements ModelRegistry, PojoObjectDecoderRegistry
-
Constructor Summary
Constructors Constructor Description MessageModelRegistry()MessageModelRegistry(ModelCollection collection) -
Method Summary
Modifier and Type Method Description voidaddMessageDecoder(java.lang.String uuid, PojoObjectDecoder<? extends MessageObject> decoder)ModelRegistryaddModel(MessageModel model)ModelRegistryaddModelCollection(ModelCollection collection)booleancontainsDecoder(java.lang.String uuid)java.util.List<MessageModel>getAllModels()MessageModelgetLatestModel(java.lang.String uuid)java.util.List<MessageModel>getLatestModels()PojoObjectDecoder<? extends MessageObject>getMessageDecoder(java.lang.String uuid)MessageModelgetModel(byte[] message)MessageModelgetModel(java.lang.String uuid, short modelVersion)java.util.List<MessageModel>getModelVersions(java.lang.String uuid)voidmergeRegistry(ModelRegistry registry)byte[]toBytes()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MessageModelRegistry
public MessageModelRegistry() -
MessageModelRegistry
-
-
Method Details
-
mergeRegistry
- Specified by:
mergeRegistryin interfaceModelRegistry
-
getLatestModels
- Specified by:
getLatestModelsin interfaceModelRegistry
-
getAllModels
- Specified by:
getAllModelsin interfaceModelRegistry
-
getModelVersions
- Specified by:
getModelVersionsin interfaceModelRegistry
-
getModel
- Specified by:
getModelin interfaceModelRegistry
-
getLatestModel
- Specified by:
getLatestModelin interfaceModelRegistry
-
getModel
- Specified by:
getModelin interfaceModelRegistry- Throws:
java.io.IOException
-
addModel
- Specified by:
addModelin interfaceModelRegistry
-
addModelCollection
- Specified by:
addModelCollectionin interfaceModelRegistry
-
getMessageDecoder
- Specified by:
getMessageDecoderin interfacePojoObjectDecoderRegistry
-
containsDecoder
public boolean containsDecoder(java.lang.String uuid)- Specified by:
containsDecoderin interfacePojoObjectDecoderRegistry
-
addMessageDecoder
public void addMessageDecoder(java.lang.String uuid, PojoObjectDecoder<? extends MessageObject> decoder)- Specified by:
addMessageDecoderin interfacePojoObjectDecoderRegistry
-
toBytes
public byte[] toBytes()- Specified by:
toBytesin interfaceModelRegistry
-