Class NSURLSessionTask

    • Constructor Detail

      • NSURLSessionTask

        protected NSURLSessionTask​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static 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()
      • 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

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • 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

        public java.lang.Object copyWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • 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

        public NSURLRequest currentRequest()
        may differ from originalRequest due to http server redirection
      • error

        public NSError error()
        The error, if any, delivered via -URLSession:task:didCompleteWithError: This property will be nil in the event that no error occured.
      • originalRequest

        public 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.
      • response

        public 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.
      • setTaskDescription

        public void setTaskDescription​(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

        public 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()
      • 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.
      • earliestBeginDate

        public 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.
      • setCountOfBytesClientExpectsToReceive

        public void setCountOfBytesClientExpectsToReceive​(long value)
      • 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.
      • setEarliestBeginDate

        public void setEarliestBeginDate​(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.