com.sun.im.provider
Class MessageConverter
java.lang.Object
com.sun.im.provider.MessageConverter
- public abstract class MessageConverter
- extends java.lang.Object
Message converter base class.
all parts of all messages processed by the server is processed
by all configured converters in the order they are configured.
The conversion occurs before the message is relayed to receipients.
The processing may include
modifications of the part's contents and headers.
The converter may also chose to remove the part.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageConverter
public MessageConverter()
convert
public void convert(MessagePart part)
throws java.lang.Exception
- Convert a message part.
This method may make modification to the content, content-type
and content-name of the provided MessagePart object.
It needs to be overwritten by actual document converters.
- Parameters:
part
- incoming message part to convert. If the contents
of the part once modified are null, the part is removed.
- Throws:
java.lang.Exception
- the converter may throw an Exception.
If so the
exception is logged in the server log file and the message is not
relayed to any recipients. The sender receives a negative delivery
status.
convert
public void convert(Message message)
throws java.lang.Exception
- Convert a message part.
This method may make modification to the content, content-type
and content-name of the provided MessagePart object.
It needs to be overwritten by actual document converters.
The default behaviour of this method is to call
convert(com.sun.im.service.MessagePart)
so all the extensions to MessageConverter written prior to version 7.0 will still work with later versions.
- Parameters:
message
- incoming message to convert. If the contents
of the message once modified are null, the message is removed.
- Throws:
java.lang.Exception
- the converter may throw an Exception.
If so the
exception is logged in the server log file and the message is not
relayed to any recipients. The sender receives a negative delivery
status.