Class CollectorQueue


  • public class CollectorQueue
    extends Object
    The CollectorQueue class allows administrators to create JMS collector queues.

    Collector queues 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 store it in this queue.

    • 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
    • Constructor Detail

      • CollectorQueue

        public CollectorQueue()
    • Method Detail

      • create

        public static Queue create​(String url)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying an URL acquisition queue 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 Queue create​(int serverId,
                                   String url)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying an URL acquisition 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.
        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 Queue create​(int serverId,
                                   String name,
                                   String url)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying an URL acquisition 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.
        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 Queue create​(int serverId,
                                   String name,
                                   String url,
                                   Properties props)
                            throws ConnectException,
                                   AdminException
        Administration method creating and deploying an URL acquisition queue 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.
        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.
        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.