Package com.vaadin.flow.server
Interface StreamRegistration
-
- All Superinterfaces:
Serializable
public interface StreamRegistration extends Serializable
Stream registration result.Use
getResourceUri()
to get URI afterStreamResource
/StreamReceiver
is registered.Also allows resource unregistering.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AbstractStreamResource
getResource()
Get the stream resource whose registration result is represented by thisStreamRegistration
instance.URI
getResourceUri()
Get resource URI for registeredStreamResource
instance.void
unregister()
UnregisterStreamResource
.
-
-
-
Method Detail
-
getResourceUri
URI getResourceUri()
Get resource URI for registeredStreamResource
instance.The URI is relative to the application base URI.
- Returns:
- resource URI
-
unregister
void unregister()
UnregisterStreamResource
.The resource will be removed from the session and its URI won't be served by the application anymore so that the resource becomes available for GC.
It's the developer's responsibility to call this method at the appropriate time. Otherwise the resource instance will stay in memory until the session expires.
-
getResource
AbstractStreamResource getResource()
Get the stream resource whose registration result is represented by thisStreamRegistration
instance.- Returns:
- resource, or null if resource has been already unregistered
-
-