|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cafesoft.core.message.MessageTranslatorRegistry
Registers MessageTranslator objects that are responsible for
encoding and decoding Message content. It provides methods to
lookup a translator by content type.
| Field Summary | |
protected Map |
translatorMap
The translator map. |
| Constructor Summary | |
MessageTranslatorRegistry()
Construct a new MessageTranslatorRegistry. |
|
| Method Summary | |
void |
addMessageTranslator(String contentType,
MessageTranslator translator)
Add a message translator to the registry |
Collection |
getContentTypes()
Returns all message translator descriptors from the registry. |
MessageTranslator |
getMessageTranslator(String contentType)
Returns a message translator from the registry. |
Collection |
getMessageTranslators()
Returns all message translators from the registry. |
void |
recycle()
Recycle the resources of this object |
void |
removeMessageTranslator(String contentType,
MessageTranslator translator)
Remove a message translator from the registry |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Map translatorMap
| Constructor Detail |
public MessageTranslatorRegistry()
| Method Detail |
public void recycle()
recycle in interface Recyclable
public void addMessageTranslator(String contentType,
MessageTranslator translator)
throws MessageTranslatorException
contentType - describes a type of Message that can be
translatedtranslator - the MessageTranslator to add
MessageTranslatorException
public void removeMessageTranslator(String contentType,
MessageTranslator translator)
throws MessageTranslatorException
contentType - describes a type of Message that can be
translatedtranslator - the MessageTranslator to remove
MessageTranslatorException
public MessageTranslator getMessageTranslator(String contentType)
throws MessageTranslatorException
contentType - the contentType of the MessageTranslator
MessageTranslatorExceptionpublic Collection getContentTypes()
Collection of all registered message translator
descriptorspublic Collection getMessageTranslators()
Collection of all unique registered message
translators
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||