Interface DistributionPackage
-
@ProviderType public interface DistributionPackage
A distribution package
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
closes all resources associated with this instance@NotNull java.io.InputStream
createInputStream()
creates a package stream.void
delete()
releases all resources associated with this package@NotNull java.lang.String
getId()
get package id.@NotNull DistributionPackageInfo
getInfo()
gets an additional info holder for this package.long
getSize()
@NotNull java.lang.String
getType()
get the type of package
-
-
-
Method Detail
-
getId
@NotNull @NotNull java.lang.String getId()
get package id. the id is a unique string that can be used to identify the package- Returns:
- the package id
-
getType
@NotNull @NotNull java.lang.String getType()
get the type of package- Returns:
- the package type
-
createInputStream
@NotNull @NotNull java.io.InputStream createInputStream() throws java.io.IOException
creates a package stream. a new stream is created for each call and it is the caller's obligation to close the stream.- Returns:
- an
InputStream
- Throws:
java.io.IOException
- if stream create fails
-
getSize
long getSize()
- Returns:
- the size in bytes
-
close
void close()
closes all resources associated with this instance
-
delete
void delete()
releases all resources associated with this package
-
getInfo
@NotNull @NotNull DistributionPackageInfo getInfo()
gets an additional info holder for this package. The additional info object contains control information rather than content information. For example info.origin can be used to skip distributing back to the originating endpoint.- Returns:
- the associated metadata to this package
-
-