public class NSURLSessionConfiguration extends NSObject implements NSCopying
The shared session uses the global singleton credential, cache and cookie storage objects.
An ephemeral session has no persistent disk storage for cookies, cache or credentials.
A background session can be used to perform networking operations on behalf of a suspended application, within certain constraints.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NSURLSessionConfiguration(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static NSURLSessionConfiguration |
alloc() |
static NSURLSessionConfiguration |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
boolean |
allowsCellularAccess()
allow request to route over cellular.
|
boolean |
allowsConstrainedNetworkAccess()
allow request to route over networks in constrained mode.
|
boolean |
allowsExpensiveNetworkAccess()
allow request to route over expensive networks.
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static NSURLSessionConfiguration |
backgroundSessionConfiguration(java.lang.String identifier)
Deprecated.
|
static NSURLSessionConfiguration |
backgroundSessionConfigurationWithIdentifier(java.lang.String identifier) |
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() |
NSDictionary<?,?> |
connectionProxyDictionary()
The proxy dictionary, as described by
|
java.lang.Object |
copyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static java.lang.String |
debugDescription_static() |
static NSURLSessionConfiguration |
defaultSessionConfiguration() |
static java.lang.String |
description_static() |
static NSURLSessionConfiguration |
ephemeralSessionConfiguration() |
static long |
hash_static() |
NSDictionary<?,?> |
HTTPAdditionalHeaders()
Specifies additional headers which will be set on outgoing requests.
|
long |
HTTPCookieAcceptPolicy()
Policy for accepting cookies.
|
NSHTTPCookieStorage |
HTTPCookieStorage()
The cookie storage object to use, or nil to indicate that no cookies should be handled
|
long |
HTTPMaximumConnectionsPerHost()
The maximum number of simultanous persistent connections per host
|
boolean |
HTTPShouldSetCookies()
Allow the session to set cookies on requests
|
boolean |
HTTPShouldUsePipelining()
Allow the use of HTTP pipelining
|
java.lang.String |
identifier()
identifier for the background session configuration
|
NSURLSessionConfiguration |
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) |
boolean |
isDiscretionary()
allows background tasks to be scheduled at the discretion of the system for optimal performance.
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
long |
multipathServiceType()
multipath service type to use for connections.
|
long |
networkServiceType()
type of service for requests.
|
static NSURLSessionConfiguration |
new_objc() |
NSArray<? extends org.moe.natj.objc.Class> |
protocolClasses()
An optional array of Class objects which subclass NSURLProtocol.
|
long |
requestCachePolicy()
default cache policy for requests
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
boolean |
sessionSendsLaunchEvents()
Allows the app to be resumed or launched in the background when tasks in background sessions complete
or when auth is required.
|
void |
setAllowsCellularAccess(boolean value)
allow request to route over cellular.
|
void |
setAllowsConstrainedNetworkAccess(boolean value)
allow request to route over networks in constrained mode.
|
void |
setAllowsExpensiveNetworkAccess(boolean value)
allow request to route over expensive networks.
|
void |
setConnectionProxyDictionary(NSDictionary<?,?> value)
The proxy dictionary, as described by
|
void |
setDiscretionary(boolean value)
allows background tasks to be scheduled at the discretion of the system for optimal performance.
|
void |
setHTTPAdditionalHeaders(NSDictionary<?,?> value)
Specifies additional headers which will be set on outgoing requests.
|
void |
setHTTPCookieAcceptPolicy(long value)
Policy for accepting cookies.
|
void |
setHTTPCookieStorage(NSHTTPCookieStorage value)
The cookie storage object to use, or nil to indicate that no cookies should be handled
|
void |
setHTTPMaximumConnectionsPerHost(long value)
The maximum number of simultanous persistent connections per host
|
void |
setHTTPShouldSetCookies(boolean value)
Allow the session to set cookies on requests
|
void |
setHTTPShouldUsePipelining(boolean value)
Allow the use of HTTP pipelining
|
void |
setMultipathServiceType(long value)
multipath service type to use for connections.
|
void |
setNetworkServiceType(long value)
type of service for requests.
|
void |
setProtocolClasses(NSArray<? extends org.moe.natj.objc.Class> value)
An optional array of Class objects which subclass NSURLProtocol.
|
void |
setRequestCachePolicy(long value)
default cache policy for requests
|
void |
setSessionSendsLaunchEvents(boolean value)
Allows the app to be resumed or launched in the background when tasks in background sessions complete
or when auth is required.
|
void |
setSharedContainerIdentifier(java.lang.String value)
The identifier of the shared data container into which files in background sessions should be downloaded.
|
void |
setShouldUseExtendedBackgroundIdleMode(boolean value)
Enable extended background idle mode for any tcp sockets created.
|
void |
setTimeoutIntervalForRequest(double value)
default timeout for requests.
|
void |
setTimeoutIntervalForResource(double value)
default timeout for requests.
|
void |
setTLSMaximumSupportedProtocol(int value)
The maximum allowable versions of the TLS protocol, from
|
void |
setTLSMaximumSupportedProtocolVersion(short value)
The maximum allowable versions of the TLS protocol, from
|
void |
setTLSMinimumSupportedProtocol(int value)
The minimum allowable versions of the TLS protocol, from
|
void |
setTLSMinimumSupportedProtocolVersion(short value)
The minimum allowable versions of the TLS protocol, from
|
void |
setURLCache(NSURLCache value)
The URL resource cache, or nil to indicate that no caching is to be performed
|
void |
setURLCredentialStorage(NSURLCredentialStorage value)
The credential storage object, or nil to indicate that no credential storage is to be used
|
static void |
setVersion_static(long aVersion) |
void |
setWaitsForConnectivity(boolean value)
Causes tasks to wait for network connectivity to become available, rather
than immediately failing with an error (such as NSURLErrorNotConnectedToInternet)
when it is not.
|
java.lang.String |
sharedContainerIdentifier()
The identifier of the shared data container into which files in background sessions should be downloaded.
|
boolean |
shouldUseExtendedBackgroundIdleMode()
Enable extended background idle mode for any tcp sockets created.
|
static org.moe.natj.objc.Class |
superclass_static() |
double |
timeoutIntervalForRequest()
default timeout for requests.
|
double |
timeoutIntervalForResource()
default timeout for requests.
|
int |
TLSMaximumSupportedProtocol()
The maximum allowable versions of the TLS protocol, from
|
short |
TLSMaximumSupportedProtocolVersion()
The maximum allowable versions of the TLS protocol, from
|
int |
TLSMinimumSupportedProtocol()
The minimum allowable versions of the TLS protocol, from
|
short |
TLSMinimumSupportedProtocolVersion()
The minimum allowable versions of the TLS protocol, from
|
NSURLCache |
URLCache()
The URL resource cache, or nil to indicate that no caching is to be performed
|
NSURLCredentialStorage |
URLCredentialStorage()
The credential storage object, or nil to indicate that no credential storage is to be used
|
static long |
version_static() |
boolean |
waitsForConnectivity()
Causes tasks to wait for network connectivity to become available, rather
than immediately failing with an error (such as NSURLErrorNotConnectedToInternet)
when it is not.
|
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, willChangeValuesAtIndexesForKeyprotected NSURLSessionConfiguration(org.moe.natj.general.Pointer peer)
public static boolean accessInstanceVariablesDirectly()
public static NSURLSessionConfiguration alloc()
public static NSURLSessionConfiguration allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
@Deprecated public static NSURLSessionConfiguration backgroundSessionConfiguration(java.lang.String identifier)
public static NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier(java.lang.String identifier)
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 NSURLSessionConfiguration defaultSessionConfiguration()
public static java.lang.String description_static()
public static NSURLSessionConfiguration ephemeralSessionConfiguration()
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 NSURLSessionConfiguration 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 NSDictionary<?,?> HTTPAdditionalHeaders()
public long HTTPCookieAcceptPolicy()
public NSHTTPCookieStorage HTTPCookieStorage()
public long HTTPMaximumConnectionsPerHost()
public boolean HTTPShouldSetCookies()
public boolean HTTPShouldUsePipelining()
public int TLSMaximumSupportedProtocol()
public int TLSMinimumSupportedProtocol()
public NSURLCache URLCache()
public NSURLCredentialStorage URLCredentialStorage()
public boolean allowsCellularAccess()
public NSDictionary<?,?> connectionProxyDictionary()
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
copyWithZone in interface NSCopyingpublic java.lang.String identifier()
public NSURLSessionConfiguration init()
public boolean isDiscretionary()
public void setDiscretionary(boolean value)
public long networkServiceType()
public NSArray<? extends org.moe.natj.objc.Class> protocolClasses()
public long requestCachePolicy()
public boolean sessionSendsLaunchEvents()
NOTE: macOS apps based on AppKit do not support background launch.
public void setAllowsCellularAccess(boolean value)
public void setConnectionProxyDictionary(NSDictionary<?,?> value)
public void setHTTPAdditionalHeaders(NSDictionary<?,?> value)
public void setHTTPCookieAcceptPolicy(long value)
public void setHTTPCookieStorage(NSHTTPCookieStorage value)
public void setHTTPMaximumConnectionsPerHost(long value)
public void setHTTPShouldSetCookies(boolean value)
public void setHTTPShouldUsePipelining(boolean value)
public void setNetworkServiceType(long value)
public void setProtocolClasses(NSArray<? extends org.moe.natj.objc.Class> value)
public void setRequestCachePolicy(long value)
public void setSessionSendsLaunchEvents(boolean value)
NOTE: macOS apps based on AppKit do not support background launch.
public void setSharedContainerIdentifier(java.lang.String value)
public void setShouldUseExtendedBackgroundIdleMode(boolean value)
public void setTLSMaximumSupportedProtocol(int value)
public void setTLSMinimumSupportedProtocol(int value)
public void setTimeoutIntervalForRequest(double value)
public void setTimeoutIntervalForResource(double value)
public void setURLCache(NSURLCache value)
public void setURLCredentialStorage(NSURLCredentialStorage value)
public java.lang.String sharedContainerIdentifier()
public boolean shouldUseExtendedBackgroundIdleMode()
public double timeoutIntervalForRequest()
public double timeoutIntervalForResource()
public long multipathServiceType()
public void setMultipathServiceType(long value)
public void setWaitsForConnectivity(boolean value)
Unsatisfactory connectivity (that requires waiting) includes cases where the device has limited or insufficient connectivity for a task (e.g., only has a cellular connection but the allowsCellularAccess property is NO, or requires a VPN connection in order to reach the desired host).
Default value is NO. Ignored by background sessions, as background sessions always wait for connectivity.
public boolean waitsForConnectivity()
Unsatisfactory connectivity (that requires waiting) includes cases where the device has limited or insufficient connectivity for a task (e.g., only has a cellular connection but the allowsCellularAccess property is NO, or requires a VPN connection in order to reach the desired host).
Default value is NO. Ignored by background sessions, as background sessions always wait for connectivity.
public short TLSMaximumSupportedProtocolVersion()
public short TLSMinimumSupportedProtocolVersion()
public boolean allowsConstrainedNetworkAccess()
public boolean allowsExpensiveNetworkAccess()
public void setAllowsConstrainedNetworkAccess(boolean value)
public void setAllowsExpensiveNetworkAccess(boolean value)
public void setTLSMaximumSupportedProtocolVersion(short value)
public void setTLSMinimumSupportedProtocolVersion(short value)