public class NSURLSession extends NSObject
| Modifier and Type | Class and Description |
|---|---|
static interface |
NSURLSession.Block_dataTaskWithRequestCompletionHandler |
static interface |
NSURLSession.Block_dataTaskWithURLCompletionHandler |
static interface |
NSURLSession.Block_downloadTaskWithRequestCompletionHandler |
static interface |
NSURLSession.Block_downloadTaskWithResumeDataCompletionHandler |
static interface |
NSURLSession.Block_downloadTaskWithURLCompletionHandler |
static interface |
NSURLSession.Block_flushWithCompletionHandler |
static interface |
NSURLSession.Block_getAllTasksWithCompletionHandler |
static interface |
NSURLSession.Block_getTasksWithCompletionHandler |
static interface |
NSURLSession.Block_resetWithCompletionHandler |
static interface |
NSURLSession.Block_uploadTaskWithRequestFromDataCompletionHandler |
static interface |
NSURLSession.Block_uploadTaskWithRequestFromFileCompletionHandler |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NSURLSession(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static NSURLSession |
alloc() |
static NSURLSession |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
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() |
NSURLSessionConfiguration |
configuration() |
NSURLSessionDataTask |
dataTaskWithRequest(NSURLRequest request)
Creates a data task with the given request.
|
NSURLSessionDataTask |
dataTaskWithRequestCompletionHandler(NSURLRequest request,
NSURLSession.Block_dataTaskWithRequestCompletionHandler completionHandler)
data task convenience methods.
|
NSURLSessionDataTask |
dataTaskWithURL(NSURL url)
Creates a data task to retrieve the contents of the given URL.
|
NSURLSessionDataTask |
dataTaskWithURLCompletionHandler(NSURL url,
NSURLSession.Block_dataTaskWithURLCompletionHandler completionHandler) |
static java.lang.String |
debugDescription_static() |
NSURLSessionDelegate |
delegate() |
NSOperationQueue |
delegateQueue() |
static java.lang.String |
description_static() |
NSURLSessionDownloadTask |
downloadTaskWithRequest(NSURLRequest request)
Creates a download task with the given request.
|
NSURLSessionDownloadTask |
downloadTaskWithRequestCompletionHandler(NSURLRequest request,
NSURLSession.Block_downloadTaskWithRequestCompletionHandler completionHandler)
download task convenience methods.
|
NSURLSessionDownloadTask |
downloadTaskWithResumeData(NSData resumeData)
Creates a download task with the resume data.
|
NSURLSessionDownloadTask |
downloadTaskWithResumeDataCompletionHandler(NSData resumeData,
NSURLSession.Block_downloadTaskWithResumeDataCompletionHandler completionHandler) |
NSURLSessionDownloadTask |
downloadTaskWithURL(NSURL url)
Creates a download task to download the contents of the given URL.
|
NSURLSessionDownloadTask |
downloadTaskWithURLCompletionHandler(NSURL url,
NSURLSession.Block_downloadTaskWithURLCompletionHandler completionHandler) |
void |
finishTasksAndInvalidate()
-finishTasksAndInvalidate returns immediately and existing tasks will be allowed
to run to completion.
|
void |
flushWithCompletionHandler(NSURLSession.Block_flushWithCompletionHandler completionHandler)
flush storage to disk and clear transient network caches.
|
void |
getAllTasksWithCompletionHandler(NSURLSession.Block_getAllTasksWithCompletionHandler completionHandler)
invokes completionHandler with all outstanding tasks.
|
void |
getTasksWithCompletionHandler(NSURLSession.Block_getTasksWithCompletionHandler completionHandler)
invokes completionHandler with outstanding data, upload and download tasks.
|
static long |
hash_static() |
NSURLSession |
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) |
void |
invalidateAndCancel()
-invalidateAndCancel acts as -finishTasksAndInvalidate, but issues
-cancel to all outstanding tasks for this session.
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static NSURLSession |
new_objc() |
void |
resetWithCompletionHandler(NSURLSession.Block_resetWithCompletionHandler completionHandler)
empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
java.lang.String |
sessionDescription()
The sessionDescription property is available for the developer to
provide a descriptive label for the session.
|
static NSURLSession |
sessionWithConfiguration(NSURLSessionConfiguration configuration)
Customization of NSURLSession occurs during creation of a new session.
|
static NSURLSession |
sessionWithConfigurationDelegateDelegateQueue(NSURLSessionConfiguration configuration,
NSURLSessionDelegate delegate,
NSOperationQueue queue) |
void |
setSessionDescription(java.lang.String value)
The sessionDescription property is available for the developer to
provide a descriptive label for the session.
|
static void |
setVersion_static(long aVersion) |
static NSURLSession |
sharedSession()
The shared session uses the currently set global NSURLCache,
NSHTTPCookieStorage and NSURLCredentialStorage objects.
|
NSURLSessionStreamTask |
streamTaskWithHostNamePort(java.lang.String hostname,
long port)
Creates a bidirectional stream task to a given host and port.
|
NSURLSessionStreamTask |
streamTaskWithNetService(NSNetService service)
Creates a bidirectional stream task with an NSNetService to identify the endpoint.
|
static org.moe.natj.objc.Class |
superclass_static() |
NSURLSessionUploadTask |
uploadTaskWithRequestFromData(NSURLRequest request,
NSData bodyData)
Creates an upload task with the given request.
|
NSURLSessionUploadTask |
uploadTaskWithRequestFromDataCompletionHandler(NSURLRequest request,
NSData bodyData,
NSURLSession.Block_uploadTaskWithRequestFromDataCompletionHandler completionHandler) |
NSURLSessionUploadTask |
uploadTaskWithRequestFromFile(NSURLRequest request,
NSURL fileURL)
Creates an upload task with the given request.
|
NSURLSessionUploadTask |
uploadTaskWithRequestFromFileCompletionHandler(NSURLRequest request,
NSURL fileURL,
NSURLSession.Block_uploadTaskWithRequestFromFileCompletionHandler completionHandler)
upload convenience method.
|
NSURLSessionUploadTask |
uploadTaskWithStreamedRequest(NSURLRequest request)
Creates an upload task with the given request.
|
static long |
version_static() |
NSURLSessionWebSocketTask |
webSocketTaskWithRequest(NSURLRequest request)
Creates a WebSocket task given the request.
|
NSURLSessionWebSocketTask |
webSocketTaskWithURL(NSURL url)
Creates a WebSocket task given the url.
|
NSURLSessionWebSocketTask |
webSocketTaskWithURLProtocols(NSURL url,
NSArray<java.lang.String> protocols)
Creates a WebSocket task given the url and an array of protocols.
|
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 NSURLSession alloc()
public static NSURLSession 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 NSURLSession new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static NSURLSession sessionWithConfiguration(NSURLSessionConfiguration configuration)
public static NSURLSession sessionWithConfigurationDelegateDelegateQueue(NSURLSessionConfiguration configuration, NSURLSessionDelegate delegate, NSOperationQueue queue)
public static void setVersion_static(long aVersion)
public static NSURLSession sharedSession()
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public NSURLSessionConfiguration configuration()
public NSURLSessionDataTask dataTaskWithRequest(NSURLRequest request)
public NSURLSessionDataTask dataTaskWithRequestCompletionHandler(NSURLRequest request, NSURLSession.Block_dataTaskWithRequestCompletionHandler completionHandler)
public NSURLSessionDataTask dataTaskWithURL(NSURL url)
public NSURLSessionDataTask dataTaskWithURLCompletionHandler(NSURL url, NSURLSession.Block_dataTaskWithURLCompletionHandler completionHandler)
public NSURLSessionDelegate delegate()
public NSOperationQueue delegateQueue()
public NSURLSessionDownloadTask downloadTaskWithRequest(NSURLRequest request)
public NSURLSessionDownloadTask downloadTaskWithRequestCompletionHandler(NSURLRequest request, NSURLSession.Block_downloadTaskWithRequestCompletionHandler completionHandler)
public NSURLSessionDownloadTask downloadTaskWithResumeData(NSData resumeData)
public NSURLSessionDownloadTask downloadTaskWithResumeDataCompletionHandler(NSData resumeData, NSURLSession.Block_downloadTaskWithResumeDataCompletionHandler completionHandler)
public NSURLSessionDownloadTask downloadTaskWithURL(NSURL url)
public NSURLSessionDownloadTask downloadTaskWithURLCompletionHandler(NSURL url, NSURLSession.Block_downloadTaskWithURLCompletionHandler completionHandler)
public void finishTasksAndInvalidate()
-finishTasksAndInvalidate and -invalidateAndCancel do not have any effect on the shared session singleton.
When invalidating a background session, it is not safe to create another background session with the same identifier until URLSession:didBecomeInvalidWithError: has been issued.
public void flushWithCompletionHandler(NSURLSession.Block_flushWithCompletionHandler completionHandler)
public void getAllTasksWithCompletionHandler(NSURLSession.Block_getAllTasksWithCompletionHandler completionHandler)
public void getTasksWithCompletionHandler(NSURLSession.Block_getTasksWithCompletionHandler completionHandler)
public NSURLSession init()
public void invalidateAndCancel()
public void resetWithCompletionHandler(NSURLSession.Block_resetWithCompletionHandler completionHandler)
public java.lang.String sessionDescription()
public void setSessionDescription(java.lang.String value)
public NSURLSessionStreamTask streamTaskWithHostNamePort(java.lang.String hostname, long port)
public NSURLSessionStreamTask streamTaskWithNetService(NSNetService service)
public NSURLSessionUploadTask uploadTaskWithRequestFromData(NSURLRequest request, NSData bodyData)
public NSURLSessionUploadTask uploadTaskWithRequestFromDataCompletionHandler(NSURLRequest request, NSData bodyData, NSURLSession.Block_uploadTaskWithRequestFromDataCompletionHandler completionHandler)
public NSURLSessionUploadTask uploadTaskWithRequestFromFile(NSURLRequest request, NSURL fileURL)
public NSURLSessionUploadTask uploadTaskWithRequestFromFileCompletionHandler(NSURLRequest request, NSURL fileURL, NSURLSession.Block_uploadTaskWithRequestFromFileCompletionHandler completionHandler)
public NSURLSessionUploadTask uploadTaskWithStreamedRequest(NSURLRequest request)
public NSURLSessionWebSocketTask webSocketTaskWithRequest(NSURLRequest request)
public NSURLSessionWebSocketTask webSocketTaskWithURL(NSURL url)
public NSURLSessionWebSocketTask webSocketTaskWithURLProtocols(NSURL url, NSArray<java.lang.String> protocols)