Język

SingleClientConnManager Class

Definition

Caution

This class is obsoleted in this android platform

A connection manager for a single connection.

[Android.Runtime.Register("org/apache/http/impl/conn/SingleClientConnManager", DoNotGenerateAcw=true)]
[System.Obsolete("This class is obsoleted in this android platform")]
public class SingleClientConnManager : Java.Lang.Object, IDisposable, Org.Apache.Http.Conn.IClientConnectionManager
[<Android.Runtime.Register("org/apache/http/impl/conn/SingleClientConnManager", DoNotGenerateAcw=true)>]
[<System.Obsolete("This class is obsoleted in this android platform")>]
type SingleClientConnManager = class
    inherit Object
    interface IClientConnectionManager
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
SingleClientConnManager
Attributes
Implements

Remarks

The member descriptions are based on the Android single-connection manager implementation.

AOSP source documentation for SingleClientConnManager.

Portions of this page are derived from Apache HttpClient source code made available by the Apache Software Foundation under the Apache License, Version 2.0.

Constructors

Name Description
SingleClientConnManager(IHttpParams, SchemeRegistry)

Creates a single-connection manager with a new pool entry and no allocated connection. This manager is intended for single-threaded use.

SingleClientConnManager(IntPtr, JniHandleOwnership)

Creates a managed instance that represents an existing Java object.

Fields

Name Description
MisuseMessage

The warning message logged when a new connection allocation revokes a connection that has not been released.

Properties

Name Description
AlwaysShutDown

Gets or sets whether an open connection is shut down whenever it is released.

Class

Returns the runtime class of this Object.

(Inherited from Object)
ConnectionExpiresTime

Gets or sets the expiry time of the last released connection.

ConnOperator

Gets or sets the operator used to open and update connections.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsShutDown

Gets or sets the flag that indicates whether this manager has been shut down.

JniIdentityHashCode

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

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

Gets the JNI metadata used to access members of this Java binding.

LastReleaseTime

Gets or sets the time of the last connection release.

ManagedConn

Gets or sets the currently issued managed connection adapter.

PeerReference

Gets the JNI object reference for this Java peer.

(Inherited from Object)
SchemeRegistry

Gets the schemes supported by this manager.

ThresholdClass

Gets the Java class used for virtual method dispatch.

ThresholdType

Gets the managed type that declares this Java binding.

UniquePoolEntry

Gets or sets this manager's sole pool entry.

Methods

Name Description
AssertStillUp()

Throws IllegalStateException if the manager has been shut down.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CloseExpiredConnections()

Closes an open, unallocated connection when its configured expiry time has been reached.

CloseIdleConnections(Int64, TimeUnit)

Closes the open connection if it is not allocated and was last released at least the specified time ago. Allocated connections are not closed by this method.

Construct(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
CreateConnectionOperator(SchemeRegistry)

Creates the connection operator during manager construction. Derived classes can override this method to supply a different operator.

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)
GetConnection(HttpRoute, Object)

Obtains a managed connection immediately without waiting. Revokes any previous allocation and replaces an expired, closed, or route-incompatible connection as needed.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()
Obsolete.

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)
ReleaseConnection(IManagedClientConnection, Int64, TimeUnit)

Releases and detaches the adapter, records release and expiry times, and shuts down an open connection if it is not marked reusable or shutdown on release is enabled. Releasing an already detached adapter has no further effect.

RequestConnection(HttpRoute, Object)

Creates a request that obtains a connection immediately when its get-connection method is called. The request's abort operation does nothing, and its timeout arguments are ignored.

RevokeConnection()

Logs the multiple-allocation warning, detaches the current adapter, and attempts to shut down its underlying connection. Does nothing if no adapter is allocated.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetPeerReference(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
Shutdown()

Marks this manager as shut down, detaches any allocated adapter, and attempts to shut down and discard its pool entry.

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()

Removes this instance from the runtime's Java object lookup.

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