public class XmlNotificationSerializer extends java.lang.Object implements NotificationSerializer
Notification
into an XML message.
Notification.getUserData()
is always added as object metadata against the key
"userData".
In the adapter configuration file this class is aliased as xml-jmx-notification-serializer which is the preferred alternative to the fully qualified classname when building your configuration.
OBJ_METADATA_USERDATA
Constructor and Description |
---|
XmlNotificationSerializer() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getOutputMessageEncoding() |
AdaptrisMessage |
serialize(javax.management.Notification n,
AdaptrisMessage msg) |
void |
setOutputMessageEncoding(java.lang.String encoding)
Set the encoding for the resulting XML document.
|
public AdaptrisMessage serialize(javax.management.Notification n, AdaptrisMessage msg) throws CoreException, java.io.IOException
serialize
in interface NotificationSerializer
CoreException
java.io.IOException
public java.lang.String getOutputMessageEncoding()
public void setOutputMessageEncoding(java.lang.String encoding)
If not specified the following rules will be applied:
AdaptrisMessage.getCharEncoding()
is non-null then that will be used.
As a result; the character encoding on the message is always set using InterlokMessage.setContentEncoding(String)
.
encoding
- the character