Package com.contentful.java.cda
Class Platform
- java.lang.Object
-
- com.contentful.java.cda.Platform
-
public abstract class Platform extends java.lang.ObjectAn platform abstraction layer singleton providing information about the underlying system.
-
-
Constructor Summary
Constructors Constructor Description Platform()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.concurrent.ExecutorcallbackExecutor()Return an executor for this platform.static Platformget()abstract java.lang.Stringname()How do you call this platform?abstract booleanneedsCustomTLSSocketFactory()Does this platform need to overwrite the default TLS socket factory to provide TLS1.2abstract java.lang.Stringversion()Which version of the platform is executing this app?
-
-
-
Method Detail
-
get
public static Platform get()
- Returns:
- the current platform.
-
callbackExecutor
public abstract java.util.concurrent.Executor callbackExecutor()
Return an executor for this platform.- Returns:
- an executor for this platform.
-
name
public abstract java.lang.String name()
How do you call this platform?Valid values are "Windows", "Linux", "Mac OS" and "Android".
- Returns:
- a string identifying this platform by name.
-
version
public abstract java.lang.String version()
Which version of the platform is executing this app?- Returns:
- "1.4", "4.4", "10.1" …
-
needsCustomTLSSocketFactory
public abstract boolean needsCustomTLSSocketFactory()
Does this platform need to overwrite the default TLS socket factory to provide TLS1.2The servers Contentful uses are enforcing usage of TLS 1.2. Some platforms (Android 4.x) are having TLS1.2 implemented but are not enabling it as a default. This check finds these situations and recommends overwriting the default TLSSocketFactory.
This recommendation can be overruled by using
CDAClient.Builder.setTls12Implementation(com.contentful.java.cda.Tls12Implementation).- Returns:
- true if for this platform the custom TLSSocketFactory should be used.
-
-