MFClient class
This class exposes methods that you use to communicate with the IBM MobileFirst Platform Server.
Constructors
- MFClient()
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
addGlobalHeader(
{String headerName, String headerValue}) → Future< void> -
Adds a header with name
headerName
and valueheaderValue
to all calls made by this package. [...] -
getDeviceDisplayName(
) → Future< String> - Returns the display name of the device. The display name is retrieved from the MobileFirst Server registration data.
-
getServerUrl(
) → Future< String> - Returns the URL of the Mobile Foundation server. [...]
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
pinTrustedCertificatesPublicKey(
{List< String> certificateFileNames}) → Future<void> - Pins the host X509 certificate public key to the client application. Secured calls to the pinned remote host will be checked for a public key match. Secured calls to other hosts containing other certificates will be rejected. Some mobile operating systems might cache the certificate validation check results. Your app must call the certificate pinning method before making a secured request. Calling this method a second time overrides any previous pinning operation. The certificates must be in DER format. When multiple certificates are pinned, a secured call is checked for a match with any one of the certificates
-
registerChallengeHandler(
{SecurityCheckChallengeHandler challengeHandler}) → dynamic -
Register a security check challenge handler
challengeHandler
to handle the challenges recieved for a given security check. -
removeGlobalHeader(
{String headerName}) → Future< void> - Removes a header that was previously added by the addGlobalHeader method [...]
-
setDeviceDisplayName(
{String deviceDisplayName}) → Future< void> -
Sets the display name of the device.
The
deviceDisplayName
is stored in the MobileFirst Server registration data. -
setHeartbeatInterval(
{int heartbeatIntervalInSeconds}) → Future< void> -
The number of seconds(
heartbeatIntervalInSeconds
) between which a heartbeat request is sent to the MobileFirst server to keep the connection alive. The default interval is 7 minutes or 420 seconds. Heartbeats are sent only when the app is in the foreground. [...] -
setServerUrl(
{String serverUrl}) → Future< void> -
Modifies the URL of the Mobile Foundation server during runtime to
serverUrl
. Calling this method clears the client context and the app is no longer logged in to any Mobile Foundation server. Subsequent calls to the Mobile Foundation server will cause a new device registration. Verifying the validity of the new URL is on the developer. [...] -
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited
Constants
- ANSWER → const String
-
"answer"
- CERTIFICATE_FILENAMES → const String
-
"certificateFileNames"
- DEVICE_DISPLAYNAME → const String
-
"deviceDisplayName"
- HEARTBEAT_INTERVAL → const String
-
"heartbeatIntervalInSeconds"
- SECURITY_CHECKNAME → const String
-
"securityCheckName"
- WLCLIENT_CERTIFICATE_PINNING → const String
-
"pinTrustedCertificatesPublicKey"
- WLCLIENT_GETDEVICE_DISPLAYNAME → const String
-
"getDeviceDisplayName"
- WLCLIENT_REGISTER_CHALLENGEHANDLER → const String
-
"registerChallengeHandler"
- WLCLIENT_SETDEVICE_DISPLAYNAME → const String
-
"setDeviceDisplayName"
- WLCLIENT_SETHEARTBEAT_INTERVAL → const String
-
"setHeartbeatInterval"