public class NSURLSessionTask extends NSObject implements NSCopying, NSProgressReporting
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NSURLSessionTask(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static NSURLSessionTask |
alloc() |
static NSURLSessionTask |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
void |
cancel()
-cancel returns immediately, but marks a task as being canceled.
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
java.lang.Object |
copyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
long |
countOfBytesClientExpectsToReceive() |
long |
countOfBytesClientExpectsToSend()
The number of bytes that the client expects (a best-guess upper-bound) will
be sent and received by this task.
|
long |
countOfBytesExpectedToReceive()
number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response.
|
long |
countOfBytesExpectedToSend()
number of body bytes we expect to send, derived from the Content-Length of the HTTP request
|
long |
countOfBytesReceived()
number of body bytes already received
|
long |
countOfBytesSent()
number of body bytes already sent
|
NSURLRequest |
currentRequest()
may differ from originalRequest due to http server redirection
|
static java.lang.String |
debugDescription_static() |
NSURLSessionTaskDelegate |
delegate()
Sets a task-specific delegate.
|
static java.lang.String |
description_static() |
NSDate |
earliestBeginDate()
Start the network load for this task no earlier than the specified date.
|
NSError |
error()
The error, if any, delivered via -URLSession:task:didCompleteWithError:
This property will be nil in the event that no error occured.
|
static long |
hash_static() |
NSURLSessionTask |
init() |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static NSURLSessionTask |
new_objc() |
NSURLRequest |
originalRequest()
may be nil if this is a stream task
|
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.
|
float |
priority()
Sets a scaling factor for the priority of the task.
|
NSProgress |
progress() |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
NSURLResponse |
response()
may be nil if no response has been received
|
void |
resume() |
void |
setCountOfBytesClientExpectsToReceive(long value) |
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.
|
void |
setDelegate(NSURLSessionTaskDelegate value)
Sets a task-specific delegate.
|
void |
setEarliestBeginDate(NSDate value)
Start the network load for this task no earlier than the specified date.
|
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.
|
void |
setPriority(float value)
Sets a scaling factor for the priority of the task.
|
void |
setTaskDescription(java.lang.String value)
The taskDescription property is available for the developer to
provide a descriptive label for the task.
|
static void |
setVersion_static(long aVersion) |
long |
state()
The current state of the task within the session.
|
static org.moe.natj.objc.Class |
superclass_static() |
void |
suspend()
Suspending a task will prevent the NSURLSession from continuing to
load data.
|
java.lang.String |
taskDescription()
The taskDescription property is available for the developer to
provide a descriptive label for the task.
|
long |
taskIdentifier()
an identifier for this task, assigned by and unique to the owning session
|
static long |
version_static() |
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, 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, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static NSURLSessionTask alloc()
public static NSURLSessionTask allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static NSURLSessionTask new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public void cancel()
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
copyWithZone in interface NSCopyingpublic long countOfBytesExpectedToReceive()
public long countOfBytesExpectedToSend()
public long countOfBytesReceived()
public long countOfBytesSent()
public NSURLRequest currentRequest()
public NSError error()
public NSURLSessionTask init()
public NSURLRequest originalRequest()
public float priority()
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.
public NSURLResponse response()
public void resume()
public void setPriority(float value)
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.
public void setTaskDescription(java.lang.String value)
public long state()
public void suspend()
public java.lang.String taskDescription()
public long taskIdentifier()
public long countOfBytesClientExpectsToReceive()
public long countOfBytesClientExpectsToSend()
public NSDate earliestBeginDate()
Only applies to tasks created from background NSURLSession instances; has no effect for tasks created from other session types.
public NSProgress progress()
progress in interface NSProgressReportingpublic void setCountOfBytesClientExpectsToReceive(long value)
public void setCountOfBytesClientExpectsToSend(long value)
public void setEarliestBeginDate(NSDate value)
Only applies to tasks created from background NSURLSession instances; has no effect for tasks created from other session types.
public NSURLSessionTaskDelegate 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`.
public boolean prefersIncrementalDelivery()
Defaults to true unless this task is created with completion-handler based convenience methods, or if it is a download task.
public void setDelegate(NSURLSessionTaskDelegate value)
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`.
public void setPrefersIncrementalDelivery(boolean value)
Defaults to true unless this task is created with completion-handler based convenience methods, or if it is a download task.