Package com.vaadin.server
Interface ConnectorResource
-
- All Superinterfaces:
Resource
,Serializable
- All Known Implementing Classes:
ClassResource
,FileResource
,StreamResource
public interface ConnectorResource extends Resource
A resource that is served through the Connector that is using the resource.- Since:
- 7.0.0
- Version:
- Author:
- Vaadin Ltd
- See Also:
AbstractClientConnector.setResource(String, Resource)
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONNECTOR_PATH
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getFilename()
Gets the virtual filename for this resource.DownloadStream
getStream()
Gets resource as stream.-
Methods inherited from interface com.vaadin.server.Resource
getMIMEType
-
-
-
-
Field Detail
-
CONNECTOR_PATH
static final String CONNECTOR_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStream
DownloadStream getStream()
Gets resource as stream.Note that this method is called while the session is locked to prevent race conditions but the methods in the returned
DownloadStream
are assumed to be unrelated to the VaadinSession and are called without holding session locks (to prevent locking the session during long file downloads).- Returns:
- A download stream which produces the resource content
-
getFilename
String getFilename()
Gets the virtual filename for this resource.- Returns:
- the file name associated to this resource.
-
-