Class StandardRendezvousTranslator
- All Implemented Interfaces:
AdaptrisMessageTranslator
,RendezvousTranslator
Implementation of RendezvousTranslator
which stores AdaptrisMessage
's payload against a TibrvMsg
field of type TibrvMsg.OPAQUE
, and unique ID and char encoding against fields of type TibrvMsg.STRING
.
AdaptrisMessage
metadata is store in a child TibrvMsg
as Tibrv.STRING
s using the metadata key as
the 'name.
The names against which these elements are stored / expected to be found in TibrvMsg
are configurable and defaulted in the
constructor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name that (optional) character encoding details are stored against inTibrvMsg
.Returns the name that the childTibrvMsg
containing metadata is stored against in the parentTibrvMsg
.Returns the name that the payload is stored against inTibrvMsg
.Returns the name that the message unique ID is stored against inTibrvMsg
.void
void
Sets the name that (optional) character encoding details are stored against inTibrvMsg
.void
Sets the name that the childTibrvMsg
containing metadata is stored against in the parentTibrvMsg
.void
Sets the name that the payload is stored against inTibrvMsg
.void
Sets the name that the message unique ID is stored against inTibrvMsg
.toString()
com.tibco.tibrv.TibrvMsg
translate
(AdaptrisMessage msg, String sendSubject) Create a newTibrvMsg
based on the passedAdaptrisMessage
andsendSubject
.translate
(com.tibco.tibrv.TibrvMsg tibrvMsg) Create a newAdaptrisMessage
based on the passedTibrvMsg
.
-
Constructor Details
-
StandardRendezvousTranslator
public StandardRendezvousTranslator()Creates a new instance. Default names are
char-enc
,metadata
,payoad
,unique-id
.
-
-
Method Details
-
registerMessageFactory
- Specified by:
registerMessageFactory
in interfaceAdaptrisMessageTranslator
- See Also:
-
currentMessageFactory
- Specified by:
currentMessageFactory
in interfaceAdaptrisMessageTranslator
- See Also:
-
translate
Description copied from interface:RendezvousTranslator
Create a new
TibrvMsg
based on the passedAdaptrisMessage
andsendSubject
.- Specified by:
translate
in interfaceRendezvousTranslator
- Parameters:
msg
- theAdaptrisMessage
to translatesendSubject
- the send subject to use- Returns:
- a new
TibrvMsg
- Throws:
Exception
- if any occur- See Also:
-
translate
Description copied from interface:RendezvousTranslator
Create a new
AdaptrisMessage
based on the passedTibrvMsg
.- Specified by:
translate
in interfaceRendezvousTranslator
- Parameters:
tibrvMsg
- theTibrvMsg
to translate- Returns:
- a new
AdaptrisMessage
- Throws:
Exception
- if any occur- See Also:
-
toString
-
getCharEncName
Returns the name that (optional) character encoding details are stored against in
TibrvMsg
.- Returns:
- the name that (optional) character encoding details are stored against in
TibrvMsg
-
setCharEncName
Sets the name that (optional) character encoding details are stored against in
TibrvMsg
. May not be null or empty.- Parameters:
s
- the name that (optional) character encoding details are stored against inTibrvMsg
-
getPayloadName
Returns the name that the payload is stored against in
TibrvMsg
.- Returns:
- the name that the payload is stored against in
TibrvMsg
-
setPayloadName
Sets the name that the payload is stored against in
TibrvMsg
. May not be null or empty.- Parameters:
s
- the name that the payload is stored against inTibrvMsg
-
getUniqueIdName
Returns the name that the message unique ID is stored against in
TibrvMsg
.- Returns:
- the name that the message unique ID is stored against in
TibrvMsg
-
setUniqueIdName
Sets the name that the message unique ID is stored against in
TibrvMsg
. May not be null or empty.- Parameters:
s
- the name that the message unique ID is stored against inTibrvMsg
-
getMetadataName
Returns the name that the child
TibrvMsg
containing metadata is stored against in the parentTibrvMsg
.- Returns:
- the name that the child
TibrvMsg
containing metadata is stored against in the parentTibrvMsg
-
setMetadataName
Sets the name that the child
TibrvMsg
containing metadata is stored against in the parentTibrvMsg
. May not be null or empty.- Parameters:
s
- the name that the childTibrvMsg
containing metadata is stored against in the parentTibrvMsg
-