Class URLOutputNode


  • public class URLOutputNode
    extends Node
    This Node writes out incoming streams the specified URL.

    As several incoming streams cause several resulting files, the filenames can be patternized:

    Currently, the only supported protocols are:

    file
    stores the results on the server side
    ftp
    uploads the result on an FTP server

    As this node is a data sink it must not have a successor.

    • Constructor Detail

      • URLOutputNode

        public URLOutputNode()
    • Method Detail

      • generateEffectiveURL

        public URL generateEffectiveURL​(StreamDescriptor sd,
                                        String seqNumber)
                                 throws MalformedURLException
        Creates an URL for a Stream to write as specified in this node and replaces all patterns.
        Parameters:
        sd - The StreamDescriptor
        seqNumber - The sequence number of the Stream
        Returns:
        The URI where so store the Stream
        Throws:
        MalformedURLException - If the given parameters are not valid
      • getWorkerClassName

        public String getWorkerClassName()
        Description copied from class: Node
        Return the node's associated com.levigo.jadice.server.core.NodeWorker full qualified class's name. By default, the worker class name is
        • The same as the node name with the trailing "Node" replaced by "Worker" if the node name ends in "Node"
        • The node class name with an appended "Worker" otherwise.
        The package name of the worker class is the name of the Node's package with an appended ".worker".

        This behavior can be overridden in concrete subclasses.

        Overrides:
        getWorkerClassName in class Node
        Returns:
        the full qualified class name of the worker of this node.
      • getFileNamePattern

        public String getFileNamePattern()
      • setFileNamePattern

        public void setFileNamePattern​(String fileNamePattern)
        Set a pattern for the filename.

        Legal place holders are SEQUENCE_NUMBER and STREAMDESCRIPTOR_FILENAME.

        Parameters:
        fileNamePattern - The pattern to set
      • isAllowOverwrite

        public boolean isAllowOverwrite()
      • setAllowOverwrite

        public void setAllowOverwrite​(boolean allowOverwrite)
        Flag if it's allowed to overwrite already existing files (default: false). In such a case an error with MessageID JS.SERVER.NODES-OVERWRITE_FORBIDDEN will be raised.

        Implementation node: This flag is only respected when using the protocol file.

        Parameters:
        allowOverwrite - files are allowed be be overwritten iff set to true
      • getUrlPath

        public URL getUrlPath()
      • setUrlPath

        public void setUrlPath​(URL url)
        Set the path of the URL (without the filename)
        Parameters:
        url - the base URL.
      • getOutputCardinality

        public Node.Cardinality getOutputCardinality()
        Description copied from class: Node
        Return the output cardinality of this node, i.e. how many bundles (not streams!) it expects to produce. By default, nodes are "pipe-style", i.e. one input, one output.
        Overrides:
        getOutputCardinality in class Node
        Returns:
        output cardinality
      • addStreamListener

        public void addStreamListener​(URLOutputNode.StreamListener listener)
        Adds a listener to be informed about a Stream been written
        Parameters:
        listener - The listener to add
        Since:
        jadice server 5.4.2.0