public final class MessageEncodingTypeDescriptor extends SmaObject
This class contains information to describe a message encoding type. It also contains methods to persist and load encoding type descriptors to/from Rumi configuration respositories.
| Modifier and Type | Method and Description |
|---|---|
static MessageEncodingTypeDescriptor |
create(String name,
int id,
String serializerClassName,
String reflectorClassName)
Create an smaty message encoding type descriptor.
|
void |
delete(IConfigRepository repo)
Delete a message encoding type descriptor from a configuration repository.
|
static boolean |
exists(IConfigRepository repo,
String name)
Checks if a message encoding type descriptor is present in a configuration
repository.
|
static boolean |
exists(String name)
Checks if a message encoding type descriptor is present in the local
configuration repository
|
int |
getId()
Get the id of the message encoding type that this descriptor describes.
|
String |
getName()
Get the name of the message encoding type that this descriptor describes.
|
String |
getReflectorClassName()
Get the java class implementing reflectors that can generically introspect
messages with encoding types described by this class.
|
String |
getSerializerClassName()
Get the java class implementing serializers of messages with encoding types
described by this class.
|
static MessageEncodingTypeDescriptor |
load(IConfigRepository repo,
String name)
Create a message encoding type descriptor from a configuration repository.
|
static MessageEncodingTypeDescriptor |
load(String name)
Create a message encoding type descriptor from the local configuration repository.
|
static Map<Integer,MessageEncodingTypeDescriptor> |
loadAll()
Create message encoding type descriptors for all encodings in the local
configuration repository.
|
static Map<Integer,MessageEncodingTypeDescriptor> |
loadAll(IConfigRepository repo)
Create message encoding type descriptors for all encodings in a configuration repository.
|
void |
save(IConfigRepository repo)
Save a message encoding type descriptor to a configuration repository.
|
String |
toString()
Returns a string representation of this object
|
getChecked, getThreaded, getTracerpublic final String getName()
public final int getId()
public final String getSerializerClassName()
public final String getReflectorClassName()
public final void save(IConfigRepository repo) throws SmaException
repo - The configuration respository to save the descriptor to.SmaException - Thrown in case an error in encountered during the
saving of the object.This method saves a message encoding type descriptor to a configuration repository. The descriptor is stored in a format suitable for loading subsequently using any of the load methods offered by this class.
public final void delete(IConfigRepository repo) throws SmaException
repo - The configuration respository to delete from.SmaException - Thrown in case an error in encountered during the
deletion of the descriptor.This method deletes a message encoding type descriptor from a configuration repository.
public final String toString()
public static boolean exists(IConfigRepository repo, String name)
repo - The configuration respository to check in.name - The name of the encoding to check for.public static boolean exists(String name)
name - The name of the encoding type to check for.public static MessageEncodingTypeDescriptor create(String name, int id, String serializerClassName, String reflectorClassName)
name - The name of the encoding.id - The encoding's unique identifier.serializerClassName - The name of the encodings's serializer class.reflectorClassName - The name of the class that can generically
introspect messages of an encoding type.public static MessageEncodingTypeDescriptor load(IConfigRepository repo, String name) throws SmaException
repo - The configuration respository to create the descriptor from.name - The name of the encoding.SmaExceptionThis method creates and creates a message encoding type descriptor from a configuration repository.
public static MessageEncodingTypeDescriptor load(String name) throws SmaException
name - The name of the encoding.SmaExceptionThis method creates and initializes a message encoding type descriptor from the local configuration repository.
public static Map<Integer,MessageEncodingTypeDescriptor> loadAll(IConfigRepository repo) throws SmaException
repo - The configuration respository to load the encodings from.This method creates and initializes message encoding type descriptors for each of the providers present in the configuration repository.
SmaExceptionpublic static Map<Integer,MessageEncodingTypeDescriptor> loadAll() throws SmaException
This method creates and initializes message encoding type descriptors for each of the encodings present in the local configuration repository.
SmaExceptionCopyright © 2019 N5 Technologies, Inc. All Rights Reserved.