Class MailDistributionQueue
- java.lang.Object
-
- org.objectweb.joram.client.jms.admin.MailDistributionQueue
-
public class MailDistributionQueue extends Object
TheMailDistributionQueueclass allows administrators to create Mail distribution queues.Using an e-mail account, mail destinations allow you to forward Joram's messages to an external email account using SMTP.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMailDistributionClass name of handler allowing to distribute messages to a SMTP mail server.
-
Constructor Summary
Constructors Constructor Description MailDistributionQueue()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Queuecreate()Administration method creating and deploying a Mail distribution queue on the local server.static Queuecreate(int serverId)Administration method creating and deploying a Mail distribution queue on a given server.static Queuecreate(int serverId, String name)Administration method creating and deploying a Mail distribution queue on a given server.static Queuecreate(int serverId, String name, Properties props)Administration method creating and deploying a Mail distribution queue on a given server.
-
-
-
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
-
-
Method Detail
-
create
public static Queue create() throws ConnectException, AdminException
Administration method creating and deploying a Mail distribution queue 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 Queue create(int serverId) throws ConnectException, AdminException
Administration method creating and deploying a Mail distribution queue 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 queue.- 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 Queue create(int serverId, String name) throws ConnectException, AdminException
Administration method creating and deploying a Mail distribution queue 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 queue.name- The name of the created queue.- 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 Queue create(int serverId, String name, Properties props) throws ConnectException, AdminException
Administration method creating and deploying a Mail distribution queue 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.
Be careful this method use the static AdminModule connection.
- Parameters:
serverId- The identifier of the server where deploying the queue.name- The name of the created queue.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.
-
-