BlobStoreManager.Session Class

Definition

Represents an ongoing session of a blob's contribution to the blob store managed by the system.

[Android.Runtime.Register("android/app/blob/BlobStoreManager$Session", ApiSince=30, DoNotGenerateAcw=true)]
public class BlobStoreManager.Session : Java.Lang.Object, IDisposable, Java.IO.ICloseable
[<Android.Runtime.Register("android/app/blob/BlobStoreManager$Session", ApiSince=30, DoNotGenerateAcw=true)>]
type BlobStoreManager.Session = class
    inherit Object
    interface ICloseable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
BlobStoreManager.Session
Attributes
Implements

Remarks

Represents an ongoing session of a blob's contribution to the blob store managed by the system.

Clients that want to contribute a blob need to first create a Session using #createSession(BlobHandle) and once the session is created, clients can open and close this session multiple times using #openSession(long) and Session#close() before committing it using Session#commit(Executor, Consumer), at which point system will take ownership of the blob and the client can no longer make any modifications to the blob's content.

Java documentation for android.app.blob.BlobStoreManager.Session.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

Name Description
BlobStoreManager.Session(IntPtr, JniHandleOwnership)

Properties

Name Description
Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsPublicAccessAllowed

Returns true if public access has been allowed by using #allowPublicAccess().

IsSameSignatureAccessAllowed

Returns true if access has been allowed for packages signed with the same certificate as the caller by using #allowSameSignatureAccess().

JniIdentityHashCode

Gets the identity hash code assigned to this Java peer by the interop runtime.

(Inherited from Object)
JniManagedPeerState (Inherited from JavaObject)
JniPeerMembers
PeerReference

Gets the JNI object reference for this Java peer.

(Inherited from Object)
Size

Gets the size of the blob file that was written to the session so far.

ThresholdClass
ThresholdType

Methods

Name Description
Abandon()

Abandon this session and delete any data that was written to this session so far.

AllowPackageAccess(String, Byte[])

Allow packageName with a particular signing certificate to access this blob data once it is committed using a BlobHandle representing the blob.

AllowPublicAccess()

Allow any app on the device to access this blob data once it is committed using a BlobHandle representing the blob.

AllowSameSignatureAccess()

Allow packages which are signed with the same certificate as the caller to access this blob data once it is committed using a BlobHandle representing the blob.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Close()

Close this session.

Commit(IExecutor, IConsumer)

Commit the file that was written so far to this session to the blob store maintained by the system.

Construct(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
Dispose()

Releases the resources held by this Java peer.

(Inherited from Object)
Dispose(Boolean)

Releases the resources held by this Java peer.

(Inherited from Object)
DisposeUnlessReferenced() (Inherited from JavaObject)
Equals(Object) (Inherited from JavaObject)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
IsPackageAccessAllowed(String, Byte[])

Returns true if access has been allowed for a packageName using either #allowPackageAccess(String, byte[]).

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
OpenRead()

Opens a file descriptor to read the blob content already written into this session.

OpenWrite(Int64, Int64)

Opens a file descriptor to write a blob into the session.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetPeerReference(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
ToArray<T>()

Creates a managed array from this Java array wrapper.

(Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime()

Unregisters this Java peer from the interop runtime.

(Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

Name Description
IJavaPeerable.Disposed() (Inherited from JavaObject)
IJavaPeerable.Finalized() (Inherited from JavaObject)
IJavaPeerable.JniObjectReferenceControlBlock (Inherited from JavaObject)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from JavaObject)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from JavaObject)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from JavaObject)
IJavaPeerable.UnregisterFromRuntime()

Extension Methods

Name Description
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to