Class MailDistribution
- java.lang.Object
-
- com.scalagent.joram.mom.dest.mail.MailDistribution
-
- All Implemented Interfaces:
DistributionHandler
public class MailDistribution extends Object implements DistributionHandler
-
-
Constructor Summary
Constructors Constructor Description MailDistribution()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this handler and releases any system resources associated to it.voiddistribute(Message fullMessage)Distributes the given message outside of the JORAM server.private MimeBodyPartgetMultipartProp(Message msg)voidinit(Properties properties, boolean firstTime)Configures the handler with the given properties.voidsendJavaMail(Message fullMessage)Be careful, the message must be completely loaded (body).
-
-
-
Method Detail
-
distribute
public void distribute(Message fullMessage) throws Exception
Description copied from interface:DistributionHandlerDistributes the given message outside of the JORAM server.- Specified by:
distributein interfaceDistributionHandler- Parameters:
fullMessage- the message to distribute- Throws:
Exception- if the message could not be distributed. The message will be forwarded to a DMQ, if any.
-
init
public void init(Properties properties, boolean firstTime)
Description copied from interface:DistributionHandlerConfigures the handler with the given properties.- Specified by:
initin interfaceDistributionHandler- Parameters:
properties- The initial set of properties.
-
sendJavaMail
public void sendJavaMail(Message fullMessage) throws Exception
Be careful, the message must be completely loaded (body).- Parameters:
fullMessage-- Throws:
Exception
-
getMultipartProp
private MimeBodyPart getMultipartProp(Message msg) throws Exception
- Throws:
Exception
-
close
public void close()
Description copied from interface:DistributionHandlerCloses this handler and releases any system resources associated to it. There will be no subsequent call to this handler after it has been closed.- Specified by:
closein interfaceDistributionHandler
-
-