public abstract class MessageType extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
MessageType.ParameterSpecification
A class representing a parameter or parameter set specification.
|
Constructor and Description |
---|
MessageType(String name,
MessageType.ParameterSpecification[] params,
MessageType.ParameterSpecification[] paramsets)
Create a new message type.
|
Modifier and Type | Method and Description |
---|---|
Map |
createReply(Map msg)
Create a reply to a message.
|
boolean |
equals(Object o)
Test if two message types are equal (based on the name).
|
IContentCodec |
findContentCodec(IContentCodec[] codecs,
IMessageAdapter message,
String param)
Find a matching content codec for a given message parameter.
|
IContentCodec |
findContentCodec(IContentCodec[] codecs,
Map message,
String param)
Find a matching content codec for a given message parameter.
|
abstract String[] |
getCodecInfos(String name)
Get the en/decode info (important) for a parameter/set.
|
MessageType.ParameterSpecification[] |
getConversationIdentifiers()
Get the conversation identifiers.
|
abstract String |
getIdIdentifier()
Get the identifier for fetching the message id.
|
String |
getName()
The name of the message type.
|
MessageType.ParameterSpecification |
getParameter(String name)
Get a parameter specification by name (including parameter sets).
|
String[] |
getParameterNames()
Get all parameter names.
|
MessageType.ParameterSpecification[] |
getParameters()
Get the default parameters.
|
MessageType.ParameterSpecification |
getParameterSet(String name)
Get a parameter specification by name (including parameter sets).
|
String[] |
getParameterSetNames()
Get all parameter set names.
|
MessageType.ParameterSpecification[] |
getParameterSets()
Get the default parameter sets.
|
abstract String |
getReceiverIdentifier()
Get the identifier for fetching the receivers.
|
abstract String |
getSenderIdentifier()
Get the identifier for fetching the sender.
|
abstract String |
getSimplifiedRepresentation(Map msg)
Get a simplified human readable representation of the message content.
|
abstract String |
getTimestampIdentifier()
Get the identifier for fetching the send date.
|
public MessageType(String name, MessageType.ParameterSpecification[] params, MessageType.ParameterSpecification[] paramsets)
name
- The name of the message type.public String getName()
public MessageType.ParameterSpecification[] getParameters()
public MessageType.ParameterSpecification[] getParameterSets()
public String[] getParameterNames()
public String[] getParameterSetNames()
public MessageType.ParameterSpecification getParameter(String name)
public MessageType.ParameterSpecification getParameterSet(String name)
public MessageType.ParameterSpecification[] getConversationIdentifiers()
public abstract String getReceiverIdentifier()
public abstract String getSenderIdentifier()
public abstract String getIdIdentifier()
public abstract String getTimestampIdentifier()
public abstract String[] getCodecInfos(String name)
The
- name of the parameter/set.public abstract String getSimplifiedRepresentation(Map msg)
The
- message.public IContentCodec findContentCodec(IContentCodec[] codecs, Map message, String param)
codecs
- The available codecs.message
- The message.param
- The parameter to be (en/de)coded.public IContentCodec findContentCodec(IContentCodec[] codecs, IMessageAdapter message, String param)
codecs
- The available codecs.message
- The message.param
- The parameter to be (en/de)coded.public boolean equals(Object o)
Copyright © 2012. All Rights Reserved.