com.vaadin.server.

Class ExternalResource

  • All Implemented Interfaces:

    Resource, Serializable

    public class ExternalResource
    extends Object
    implements Resource

    ExternalResource implements source for resources fetched from location specified by URL:s. The resources are fetched directly by the client terminal and are not fetched through the terminal adapter.

    Since:

    3.0

    Author:

    Vaadin Ltd.

    See Also:

    Serialized Form

    • Constructor Detail

      • ExternalResource

        public ExternalResource​(URL sourceURL)

        Creates a new download component for downloading directly from given URL.

        Parameters:

        sourceURL - the source URL.

      • ExternalResource

        public ExternalResource​(URL sourceURL,
                                String mimeType)

        Creates a new download component for downloading directly from given URL.

        Parameters:

        sourceURL - the source URL.

        mimeType - the MIME Type

      • ExternalResource

        public ExternalResource​(String sourceURL)

        Creates a new download component for downloading directly from given URL.

        Parameters:

        sourceURL - the source URL.

      • ExternalResource

        public ExternalResource​(String sourceURL,
                                String mimeType)

        Creates a new download component for downloading directly from given URL.

        Parameters:

        sourceURL - the source URL.

        mimeType - the MIME Type

    • Method Detail

      • getURL

        public String getURL()

        Gets the URL of the external resource.

        Returns:

        the URL of the external resource.

      • setMIMEType

        public void setMIMEType​(String mimeType)

        Sets the MIME type of the resource.