Class CollectorTopic
- java.lang.Object
-
- org.objectweb.joram.client.jms.admin.CollectorTopic
-
public class CollectorTopic extends Object
TheCollectorTopicclass allows administrators to create JMS collector topics (JMS bridge in).Collector topics are special destinations usable to collect a document from a specified URL. They can be used to periodically import a file from an URL to a Joram's message and forward to each subscribers.
-
-
Field Summary
Fields Modifier and Type Field Description static StringURLAcquisitionClass name of handler allowing to acquire messages from a specified URL.
-
Constructor Summary
Constructors Constructor Description CollectorTopic()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Topiccreate(int serverId, String url)Administration method creating and deploying an URL acquisition topic on a given server.static Topiccreate(int serverId, String name, String url)Administration method creating and deploying an URL acquisition topic on a given server.static Topiccreate(int serverId, String name, String url, Properties props)Administration method creating and deploying an URL acquisition topic on a given server.static Topiccreate(String url)Administration method creating and deploying an URL acquisition topic on the local server.
-
-
-
Field Detail
-
URLAcquisition
public static final String URLAcquisition
Class name of handler allowing to acquire messages from a specified URL.- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static Topic create(String url) throws ConnectException, AdminException
Administration method creating and deploying an URL acquisition topic on the local server.The request fails if the destination deployment fails server side.
Be careful this method use the static AdminModule connection.
- Parameters:
url- the URL locating the element to collect.- Returns:
- the created destination.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
create(int, String, String, Properties)
-
create
public static Topic create(int serverId, String url) throws ConnectException, AdminException
Administration method creating and deploying an URL acquisition 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.url- the URL locating the element to collect.- Returns:
- the created destination.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
create(int, String, String, Properties)
-
create
public static Topic create(int serverId, String name, String url) throws ConnectException, AdminException
Administration method creating and deploying an URL acquisition 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.url- the URL locating the element to collect.- Returns:
- the created destination.
- Throws:
ConnectException- If the administration connection is closed or broken.AdminException- If the request fails.- See Also:
create(int, String, String, Properties)
-
create
public static Topic create(int serverId, String name, String url, Properties props) throws ConnectException, AdminException
Administration method creating and deploying an URL acquisition topic on a given server.A set of properties is used to configure the distribution destination:
- period – .
- acquisition.period - The period between two acquisitions, default is 0 (no periodic acquisition). If this last case the acquisition must be triggered by an incoming message, the destination properties can then be overloaded by the message ones.
- persistent - Tells if produced messages will be persistent, default is true (JMS default).
- expiration - Tells the life expectancy of produced messages, default is 0 (JMS default time to live).
- priority - Tells the JMS priority of produced messages, default is 4 (JMS default).
- collector.url - locates the element that will be collected.
- collector.type - indicates the type of the generated message. Default is Message.BYTES.
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.url- the URL locating the element to collect.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.
-
-