Class MailDistributionTopic


  • public class MailDistributionTopic
    extends Object
    The MailDistributionTopic class allows administrators to create Mail distribution topics.

    Using an e-mail account, mail destinations allow you to forward Joram's messages to an external email account using SMTP.

    • Field Detail

      • MailDistribution

        public static final String MailDistribution
        Class name of handler allowing to distribute messages to a SMTP mail server.

        This handler is used by default to create MailDistributionQueue, the distribution.className property allows to declare an alternate handler using different protocol or implementation.

        See Also:
        Constant Field Values
    • Constructor Detail

      • MailDistributionTopic

        public MailDistributionTopic()
    • Method Detail

      • create

        public static Topic create()
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying a Mail distribution topic on the local server.

        The request fails if the destination deployment fails server side.

        Be careful this method use the static AdminModule connection.

        Returns:
        the created destination.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.
        See Also:
        create(int, String, Properties)
      • create

        public static Topic create​(int serverId)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying a Mail distribution topic on a given server.

        The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.

        Be careful this method use the static AdminModule connection.

        Parameters:
        serverId - The identifier of the server where deploying the topic.
        Returns:
        the created destination.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.
        See Also:
        create(int, String, Properties)
      • create

        public static Topic create​(int serverId,
                                   String name)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying a Mail distribution topic on a given server.

        The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.

        Be careful this method use the static AdminModule connection.

        Parameters:
        serverId - The identifier of the server where deploying the topic.
        name - The name of the created topic.
        Returns:
        the created destination.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.
        See Also:
        create(int, String, Properties)
      • create

        public static Topic create​(int serverId,
                                   String name,
                                   Properties props)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying a Mail distribution topic on a given server.

        A set of properties is used to configure the distribution destination:

        • period – Tells the time to wait before another distribution attempt. Default is 0, which means there won't be other attempts.
        • distribution.batch – If set to true, the destination will try to distribute each time every waiting message, regardless of distribution errors. This can lead to the loss of message ordering, but will prevent a blocking message from blocking every following message. When set to false, the distribution process will stop on the first error. Default is false.
        • distribution.async - If set to true, the messages are asynchronously forwarded through a daemon.
        • smtpServer - the DNS name or IP address of the SMTP server.
        • from - the email address of the sender.
        • to, cc, bcc - a comma separated list of recipients.
        • subject - the subject of outgoing message.
        • selector - additionally a selector can be added to filter the forwarded messages.
        The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.

        Be careful this method use the static AdminModule connection.

        Parameters:
        serverId - The identifier of the server where deploying the topic.
        name - The name of the created topic.
        props - A Properties object containing all needed parameters.
        Returns:
        the created destination.
        Throws:
        ConnectException - If the administration connection is closed or broken.
        AdminException - If the request fails.