public interface TransportSession extends AutoCloseable
TransportSession that are immediately returned from Transport.open(Map) ought to be open (that is, closed() should return false). If the underlying
implementation allows a TransportSession to be re-used (i.e. to send(...) multiple files), closed() can be used to check the health of the underlying connection, and whether or not this TransportSession is still viable.
This interface extends AutoCloseable so it can be used in a try-with-resources block.
| Modifier and Type | Method and Description |
|---|---|
boolean |
closed() |
TransportResponse |
send(PackageStream packageStream,
Map<String,String> metadata)
Transfer the bytes of the supplied package to the remote system.
|
closeTransportResponse send(PackageStream packageStream, Map<String,String> metadata)
Note the PackageStream carries metadata about the package itself. However, the supplied metadata
could be used to augment the PackageStream metadata, in addition to carrying transport-related
metadata.
packageStream - the package and package metadatametadata - transport-related metadata, or any "extra" package metadataboolean closed()
Copyright © 2019. All rights reserved.