Package apple.foundation
Class NSURLSessionTask
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.foundation.NSURLSessionTask
-
- All Implemented Interfaces:
NSCopying,NSProgressReporting,NSObject
- Direct Known Subclasses:
AVAggregateAssetDownloadTask,AVAssetDownloadTask,NSURLSessionDataTask,NSURLSessionDownloadTask,NSURLSessionStreamTask,NSURLSessionWebSocketTask
public class NSURLSessionTask extends NSObject implements NSCopying, NSProgressReporting
NSURLSessionTask - a cancelable object that refers to the lifetime of processing a given request. API-Since: 7.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSURLSessionTask(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static NSURLSessionTaskalloc()static NSURLSessionTaskallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)voidcancel()-cancel returns immediately, but marks a task as being canceled.static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()@NotNull java.lang.ObjectcopyWithZone(@Nullable org.moe.natj.general.ptr.VoidPtr zone)longcountOfBytesClientExpectsToReceive()API-Since: 11.0longcountOfBytesClientExpectsToSend()The number of bytes that the client expects (a best-guess upper-bound) will be sent and received by this task.longcountOfBytesExpectedToReceive()number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response.longcountOfBytesExpectedToSend()number of body bytes we expect to send, derived from the Content-Length of the HTTP requestlongcountOfBytesReceived()number of body bytes already receivedlongcountOfBytesSent()number of body bytes already sent@Nullable NSURLRequestcurrentRequest()may differ from originalRequest due to http server redirectionstatic java.lang.StringdebugDescription_static()@Nullable NSURLSessionTaskDelegatedelegate()Sets a task-specific delegate.static java.lang.Stringdescription_static()@Nullable NSDateearliestBeginDate()Start the network load for this task no earlier than the specified date.@Nullable NSErrorerror()The error, if any, delivered via -URLSession:task:didCompleteWithError: This property will be nil in the event that no error occurred.static longhash_static()NSURLSessionTaskinit()Deprecated.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)static NSURLSessionTasknew_objc()Deprecated.@Nullable NSURLRequestoriginalRequest()may be nil if this is a stream taskbooleanprefersIncrementalDelivery()Provides a hint indicating if incremental delivery of a partial response body would be useful for the application, or if it cannot process the response until it is complete.floatpriority()Sets a scaling factor for the priority of the task.@NotNull NSProgressprogress()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)@Nullable NSURLResponseresponse()may be nil if no response has been receivedvoidresume()voidsetCountOfBytesClientExpectsToReceive(long value)API-Since: 11.0voidsetCountOfBytesClientExpectsToSend(long value)The number of bytes that the client expects (a best-guess upper-bound) will be sent and received by this task.voidsetDelegate(@Nullable NSURLSessionTaskDelegate value)Sets a task-specific delegate.voidsetEarliestBeginDate(@Nullable NSDate value)Start the network load for this task no earlier than the specified date.voidsetPrefersIncrementalDelivery(boolean value)Provides a hint indicating if incremental delivery of a partial response body would be useful for the application, or if it cannot process the response until it is complete.voidsetPriority(float value)Sets a scaling factor for the priority of the task.voidsetTaskDescription(@Nullable java.lang.String value)The taskDescription property is available for the developer to provide a descriptive label for the task.static voidsetVersion_static(long aVersion)longstate()The current state of the task within the session.static org.moe.natj.objc.Classsuperclass_static()voidsuspend()Suspending a task will prevent the NSURLSession from continuing to load data.@Nullable java.lang.StringtaskDescription()The taskDescription property is available for the developer to provide a descriptive label for the task.longtaskIdentifier()an identifier for this task, assigned by and unique to the owning sessionstatic booleanuseStoredAccessor()Deprecated.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSURLSessionTask alloc()
-
allocWithZone
public static NSURLSessionTask allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
@Deprecated public static NSURLSessionTask new_objc()
Deprecated.API-Since: 7.0 Deprecated-Since: 13.0 Deprecated-Message: Not supported
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
cancel
public void cancel()
-cancel returns immediately, but marks a task as being canceled. The task will signal -URLSession:task:didCompleteWithError: with an error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some cases, the task may signal other work before it acknowledges the cancelation. -cancel may be sent to a task that has been suspended.
-
copyWithZone
@NotNull public @NotNull java.lang.Object copyWithZone(@Nullable @Nullable org.moe.natj.general.ptr.VoidPtr zone)- Specified by:
copyWithZonein interfaceNSCopying
-
countOfBytesExpectedToReceive
public long countOfBytesExpectedToReceive()
number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response.
-
countOfBytesExpectedToSend
public long countOfBytesExpectedToSend()
number of body bytes we expect to send, derived from the Content-Length of the HTTP request
-
countOfBytesReceived
public long countOfBytesReceived()
number of body bytes already received
-
countOfBytesSent
public long countOfBytesSent()
number of body bytes already sent
-
currentRequest
@Nullable public @Nullable NSURLRequest currentRequest()
may differ from originalRequest due to http server redirection
-
error
@Nullable public @Nullable NSError error()
The error, if any, delivered via -URLSession:task:didCompleteWithError: This property will be nil in the event that no error occurred.
-
init
@Deprecated public NSURLSessionTask init()
Deprecated.API-Since: 7.0 Deprecated-Since: 13.0 Deprecated-Message: Not supported
-
originalRequest
@Nullable public @Nullable NSURLRequest originalRequest()
may be nil if this is a stream task
-
priority
public float priority()
Sets a scaling factor for the priority of the task. The scaling factor is a value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest priority and 1.0 is considered the highest. The priority is a hint and not a hard requirement of task performance. The priority of a task may be changed using this API at any time, but not all protocols support this; in these cases, the last priority that took effect will be used. If no priority is specified, the task will operate with the default priority as defined by the constant NSURLSessionTaskPriorityDefault. Two additional priority levels are provided: NSURLSessionTaskPriorityLow and NSURLSessionTaskPriorityHigh, but use is not restricted to these. API-Since: 8.0
-
response
@Nullable public @Nullable NSURLResponse response()
may be nil if no response has been received
-
resume
public void resume()
-
setPriority
public void setPriority(float value)
Sets a scaling factor for the priority of the task. The scaling factor is a value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest priority and 1.0 is considered the highest. The priority is a hint and not a hard requirement of task performance. The priority of a task may be changed using this API at any time, but not all protocols support this; in these cases, the last priority that took effect will be used. If no priority is specified, the task will operate with the default priority as defined by the constant NSURLSessionTaskPriorityDefault. Two additional priority levels are provided: NSURLSessionTaskPriorityLow and NSURLSessionTaskPriorityHigh, but use is not restricted to these. API-Since: 8.0
-
setTaskDescription
public void setTaskDescription(@Nullable @Nullable java.lang.String value)The taskDescription property is available for the developer to provide a descriptive label for the task.
-
state
public long state()
The current state of the task within the session.
-
suspend
public void suspend()
Suspending a task will prevent the NSURLSession from continuing to load data. There may still be delegate calls made on behalf of this task (for instance, to report data received while suspending) but no further transmissions will be made on behalf of the task until -resume is sent. The timeout timer associated with the task will be disabled while a task is suspended. -suspend and -resume are nestable.
-
taskDescription
@Nullable public @Nullable java.lang.String taskDescription()
The taskDescription property is available for the developer to provide a descriptive label for the task.
-
taskIdentifier
public long taskIdentifier()
an identifier for this task, assigned by and unique to the owning session
-
countOfBytesClientExpectsToReceive
public long countOfBytesClientExpectsToReceive()
API-Since: 11.0
-
countOfBytesClientExpectsToSend
public long countOfBytesClientExpectsToSend()
The number of bytes that the client expects (a best-guess upper-bound) will be sent and received by this task. These values are used by system scheduling policy. If unspecified, NSURLSessionTransferSizeUnknown is used. API-Since: 11.0
-
earliestBeginDate
@Nullable public @Nullable NSDate earliestBeginDate()
Start the network load for this task no earlier than the specified date. If not specified, no start delay is used. Only applies to tasks created from background NSURLSession instances; has no effect for tasks created from other session types. API-Since: 11.0
-
progress
@NotNull public @NotNull NSProgress progress()
- Specified by:
progressin interfaceNSProgressReporting
-
setCountOfBytesClientExpectsToReceive
public void setCountOfBytesClientExpectsToReceive(long value)
API-Since: 11.0
-
setCountOfBytesClientExpectsToSend
public void setCountOfBytesClientExpectsToSend(long value)
The number of bytes that the client expects (a best-guess upper-bound) will be sent and received by this task. These values are used by system scheduling policy. If unspecified, NSURLSessionTransferSizeUnknown is used. API-Since: 11.0
-
setEarliestBeginDate
public void setEarliestBeginDate(@Nullable @Nullable NSDate value)Start the network load for this task no earlier than the specified date. If not specified, no start delay is used. Only applies to tasks created from background NSURLSession instances; has no effect for tasks created from other session types. API-Since: 11.0
-
delegate
@Nullable public @Nullable NSURLSessionTaskDelegate delegate()
Sets a task-specific delegate. Methods not implemented on this delegate will still be forwarded to the session delegate. Cannot be modified after task resumes. Not supported on background session. Delegate is strongly referenced until the task completes, after which it is reset to `nil`. API-Since: 15.0
-
prefersIncrementalDelivery
public boolean prefersIncrementalDelivery()
Provides a hint indicating if incremental delivery of a partial response body would be useful for the application, or if it cannot process the response until it is complete. Indicating that incremental delivery is not desired may improve task performance. For example, if a response cannot be decoded until the entire content is received, set this property to false. Defaults to true unless this task is created with completion-handler based convenience methods, or if it is a download task. API-Since: 14.5
-
setDelegate
public void setDelegate(@Nullable @Nullable NSURLSessionTaskDelegate value)Sets a task-specific delegate. Methods not implemented on this delegate will still be forwarded to the session delegate. Cannot be modified after task resumes. Not supported on background session. Delegate is strongly referenced until the task completes, after which it is reset to `nil`. API-Since: 15.0
-
setPrefersIncrementalDelivery
public void setPrefersIncrementalDelivery(boolean value)
Provides a hint indicating if incremental delivery of a partial response body would be useful for the application, or if it cannot process the response until it is complete. Indicating that incremental delivery is not desired may improve task performance. For example, if a response cannot be decoded until the entire content is received, set this property to false. Defaults to true unless this task is created with completion-handler based convenience methods, or if it is a download task. API-Since: 14.5
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-