com.mobiledgex.matchingengine.MatchingEngine Class Reference

Classes

enum  FindCloudletMode
 

Public Member Functions

boolean isShutdown ()
 
 MatchingEngine (Context context)
 
 MatchingEngine (Context context, ExecutorService executorService)
 
boolean warnIfUIThread ()
 
boolean isEnableEdgeEvents ()
 
synchronized void setEnableEdgeEvents (boolean enableEdgeEvents)
 
synchronized void setEdgeEventsConfig (EdgeEventsConfig edgeEventsConfig)
 
boolean isAutoMigrateEdgeEventsConnection ()
 
synchronized void setAutoMigrateEdgeEventsConnection (boolean autoMigrateEdgeEventsConnection)
 
EdgeEventsConfig createDefaultEdgeEventsConfig ()
 
EdgeEventsConfig createDefaultEdgeEventsConfig (double latencyUpdateIntervalSeconds, double locationUpdateIntervalSeconds, double latencyThresholdTriggerMs, int internalPort)
 
synchronized CompletableFuture< Boolean > startEdgeEventsFuture (EdgeEventsConfig edgeEventsConfig)
 
synchronized boolean startEdgeEvents (EdgeEventsConfig edgeEventsConfig)
 
CompletableFuture< Boolean > restartEdgeEventsFuture ()
 
synchronized boolean restartEdgeEvents () throws DmeDnsException
 
synchronized boolean switchedToNextCloudlet () throws DmeDnsException
 
CompletableFuture< Boolean > stopEdgeEventsFuture ()
 
synchronized boolean stopEdgeEvents ()
 
synchronized CompletableFuture< EdgeEventsConnectiongetEdgeEventsConnectionFuture ()
 
synchronized EdgeEventsConnection getEdgeEventsConnection ()
 
synchronized void close ()
 
EventBus getEdgeEventsBus ()
 
boolean isUseWifiOnly ()
 
synchronized void setUseWifiOnly (boolean enabled)
 
boolean isNetworkSwitchingEnabled ()
 
void setNetworkSwitchingEnabled (boolean networkSwitchingEnabled)
 
boolean isAllowSwitchIfNoSubscriberInfo ()
 
synchronized void setAllowSwitchIfNoSubscriberInfo (boolean allowSwitchIfNoSubscriberInfo)
 
List< SubscriptionInfo > getActiveSubscriptionInfoList ()
 
boolean isRoamingDataEanbled (Context context)
 
Future submit (Callable task)
 
HashMap< String, String > getDeviceInfo ()
 
String getCarrierName (Context context)
 
String generateDmeHostAddress () throws DmeDnsException
 
NetworkManager getNetworkManager ()
 
String getPackageName (Context context)
 
void ensureSessionCookie (String sessionCookie)
 
String getLocalIpv4 ()
 
String getLocalIpAny ()
 
RegisterClientRequest.Builder createDefaultRegisterClientRequest (Context context, String organizationName) throws PackageManager.NameNotFoundException
 
RegisterClientRequest createRegisterClientRequest (Context context, String organizationName, String applicationName, String appVersion, String authToken, String uniqueIdType, String uniqueId, Map< String, String > tags) throws PackageManager.NameNotFoundException
 
VerifyLocationRequest.Builder createDefaultVerifyLocationRequest (Context context, android.location.Location location)
 
AppClient.FindCloudletRequest.Builder createDefaultFindCloudletRequest (Context context, Location location)
 
AppClient.GetLocationRequest.Builder createDefaultGetLocationRequest (Context context)
 
AppClient.AppInstListRequest.Builder createDefaultAppInstListRequest (Context context, android.location.Location location)
 
AppClient.QosPrioritySessionCreateRequest.Builder createDefaultQosPrioritySessionCreateRequest (Context context)
 
AppClient.QosPrioritySessionDeleteRequest.Builder createDefaultQosPrioritySessionDeleteRequest (Context context)
 
AppClient.DynamicLocGroupRequest.Builder createDefaultDynamicLocGroupRequest (Context context, DynamicLocGroupRequest.DlgCommType commType)
 
AppClient.QosPositionRequest.Builder createDefaultQosPositionRequest (List< QosPosition > requests, int lte_category, BandSelection band_selection)
 
RegisterClientReply registerClient (RegisterClientRequest request, long timeoutInMilliseconds) throws DmeDnsException, StatusRuntimeException, InterruptedException, ExecutionException
 
RegisterClientReply registerClient (RegisterClientRequest request, String host, int port, long timeoutInMilliseconds) throws StatusRuntimeException, InterruptedException, ExecutionException
 
Future< RegisterClientReply > registerClientFuture (RegisterClientRequest request, long timeoutInMilliseconds) throws DmeDnsException
 
Future< RegisterClientReply > registerClientFuture (RegisterClientRequest request, String host, int port, long timeoutInMilliseconds)
 
FindCloudletReply findCloudlet (FindCloudletRequest request, long timeoutInMilliseconds) throws DmeDnsException, StatusRuntimeException, InterruptedException, ExecutionException
 
FindCloudletReply findCloudlet (FindCloudletRequest request, long timeoutInMilliseconds, FindCloudletMode mode) throws DmeDnsException, StatusRuntimeException, InterruptedException, ExecutionException
 
FindCloudletReply findCloudlet (FindCloudletRequest request, String host, int port, long timeoutInMilliseconds) throws StatusRuntimeException, InterruptedException, ExecutionException
 
FindCloudletReply findCloudlet (FindCloudletRequest request, String host, int port, long timeoutInMilliseconds, FindCloudletMode mode) throws StatusRuntimeException, InterruptedException, ExecutionException
 
Future< FindCloudletReply > findCloudletFuture (FindCloudletRequest request, long timeoutInMilliseconds) throws DmeDnsException
 
Future< FindCloudletReply > findCloudletFuture (FindCloudletRequest request, long timeoutInMilliseconds, FindCloudletMode mode) throws DmeDnsException
 
Future< FindCloudletReply > findCloudletFuture (FindCloudletRequest request, String host, int port, long timeoutInMilliseconds)
 
Future< FindCloudletReply > findCloudletFuture (FindCloudletRequest request, String host, int port, long timeoutInMilliseconds, FindCloudletMode mode)
 
VerifyLocationReply verifyLocation (VerifyLocationRequest request, long timeoutInMilliseconds) throws DmeDnsException, StatusRuntimeException, InterruptedException, IOException, ExecutionException
 
VerifyLocationReply verifyLocation (VerifyLocationRequest request, String host, int port, long timeoutInMilliseconds) throws StatusRuntimeException, InterruptedException, IOException, ExecutionException
 
Future< VerifyLocationReply > verifyLocationFuture (VerifyLocationRequest request, long timeoutInMilliseconds) throws DmeDnsException
 
Future< VerifyLocationReply > verifyLocationFuture (VerifyLocationRequest request, String host, int port, long timeoutInMilliseconds)
 
AppInstListReply getAppInstList (AppInstListRequest request, long timeoutInMilliseconds) throws DmeDnsException, InterruptedException, ExecutionException
 
AppInstListReply getAppInstList (AppInstListRequest request, String host, int port, long timeoutInMilliseconds) throws InterruptedException, ExecutionException
 
Future< AppInstListReply > getAppInstListFuture (AppInstListRequest request, long timeoutInMilliseconds) throws DmeDnsException
 
Future< AppInstListReply > getAppInstListFuture (AppInstListRequest request, String host, int port, long timeoutInMilliseconds)
 
ChannelIterator< QosPositionKpiReply > getQosPositionKpi (QosPositionRequest request, long timeoutInMilliseconds) throws DmeDnsException, InterruptedException, ExecutionException
 
Future< ChannelIterator< QosPositionKpiReply > > getQosPositionKpiFuture (QosPositionRequest request, long timeoutInMilliseconds) throws DmeDnsException
 
ChannelIterator< QosPositionKpiReply > getQosPositionKpi (QosPositionRequest request, String host, int port, long timeoutInMilliseconds) throws InterruptedException, ExecutionException
 
Future< ChannelIterator< QosPositionKpiReply > > getQosPositionKpiFuture (QosPositionRequest request, String host, int port, long timeoutInMilliseconds)
 
QosPrioritySessionReply qosPrioritySessionCreate (QosPrioritySessionCreateRequest request, String host, int port, long timeoutInMilliseconds) throws ExecutionException, InterruptedException
 
QosPrioritySessionReply qosPrioritySessionCreate (QosPrioritySessionCreateRequest request, long timeoutInMilliseconds) throws ExecutionException, InterruptedException
 
Future< QosPrioritySessionReply > qosPrioritySessionCreateFuture (QosPrioritySessionCreateRequest request, long timeoutInMilliseconds)
 
Future< QosPrioritySessionReply > qosPrioritySessionCreateFuture (QosPrioritySessionCreateRequest request, String host, int port, long timeoutInMilliseconds)
 
QosPrioritySessionDeleteReply qosPrioritySessionDelete (QosPrioritySessionDeleteRequest request, String host, int port, long timeoutInMilliseconds) throws ExecutionException, InterruptedException
 
QosPrioritySessionDeleteReply qosPrioritySessionDelete (QosPrioritySessionDeleteRequest request, long timeoutInMilliseconds) throws ExecutionException, InterruptedException
 
Future< QosPrioritySessionDeleteReply > qosPrioritySessionDeleteFuture (QosPrioritySessionDeleteRequest request, String host, int port, long timeoutInMilliseconds)
 
Future< QosPrioritySessionDeleteReply > qosPrioritySessionDeleteFuture (QosPrioritySessionDeleteRequest request, long timeoutInMilliseconds)
 
Future< FindCloudletReply > registerAndFindCloudlet (final Context context, final String organizationName, final String applicationName, final String appVersion, final Location location, final String authToken, final Map< String, String > tags, final FindCloudletMode mode)
 
Future< FindCloudletReply > registerAndFindCloudlet (final Context context, final String organizationName, final String applicationName, final String appVersion, final Location location, final String authToken, final String uniqueIdType, final String uniqueId, final Map< String, String > tags, final FindCloudletMode mode)
 
Future< FindCloudletReply > registerAndFindCloudlet (final Context context, final String host, final int port, final String organizationName, final String applicationName, final String appVersion, final Location location, final String authToken, final String uniqueIdType, final String uniqueId, final Map< String, String > tags, final FindCloudletMode mode)
 
AppConnectionManager getAppConnectionManager ()
 
boolean isThreadedPerformanceTest ()
 
void setThreadedPerformanceTest (boolean threadedPerformanceTest)
 
boolean isRoamingData ()
 
boolean isWiFiEnabled (Context context)
 
boolean isWiFiCallingSupported (CarrierConfigManager carrierConfigManager)
 
int getPort ()
 
void setPort (int port)
 
boolean isSSLEnabled ()
 
void setSSLEnabled (boolean SSLEnabled)
 

Static Public Member Functions

static boolean isMatchingEngineLocationAllowed ()
 
synchronized static void setMatchingEngineLocationAllowed (boolean allowMatchingEngineLocation)
 

Static Public Attributes

static final String TAG = "MatchingEngine"
 
static final String baseDmeHost = "dme.mobiledgex.net"
 
static final String WIFIHOST = "wifi"
 
static final String wifiOnlyDmeHost = WIFIHOST + "." + baseDmeHost
 
static final String MATCHING_ENGINE_LOCATION_PERMISSION = "MATCHING_ENGINE_LOCATION_PERMISSION"
 

Detailed Description

Main MobiledgeX SDK class. This class provides functions to find nearest cloudlet with the developer's application instance deployed and to connect to that application instance.

Constructor & Destructor Documentation

◆ MatchingEngine() [1/2]

com.mobiledgex.matchingengine.MatchingEngine.MatchingEngine ( Context  context)

Constructor for MatchingEngine class.

Parameters
context(android.content.Context)

Example

MatchingEngine me = new MatchingEngine(context);
MatchingEngine(Context context)
Definition: MatchingEngine.java:170

◆ MatchingEngine() [2/2]

com.mobiledgex.matchingengine.MatchingEngine.MatchingEngine ( Context  context,
ExecutorService  executorService 
)

Constructor for MatchingEngine class.

Parameters
context(android.content.Context)
executorService(java.util.concurrent.ExecutorService)

Member Function Documentation

◆ createDefaultEdgeEventsConfig() [1/2]

EdgeEventsConfig com.mobiledgex.matchingengine.MatchingEngine.createDefaultEdgeEventsConfig ( )

Helper util to create a useful config.

◆ createDefaultEdgeEventsConfig() [2/2]

EdgeEventsConfig com.mobiledgex.matchingengine.MatchingEngine.createDefaultEdgeEventsConfig ( double  latencyUpdateIntervalSeconds,
double  locationUpdateIntervalSeconds,
double  latencyThresholdTriggerMs,
int  internalPort 
)

Helper util to create a useful config.

Parameters
latencyUpdateIntervalSecondshow often the edgeEvents tests latency to configured server.
locationUpdateIntervalSecondshow often edgeEvents will send GPS to the server. Set the location, or enable location permissions in MatchingEngine to get the location to send.
latencyThresholdTriggerMssets the upper bound of acceptable latency, and then informs the app.
internalPortthis is the internal port for your application.

◆ getAppConnectionManager()

AppConnectionManager com.mobiledgex.matchingengine.MatchingEngine.getAppConnectionManager ( )

Retrieve the app connection manager associated with this MatchingEngine instance.

Returns
AppConnectionManager

◆ isRoamingData()

boolean com.mobiledgex.matchingengine.MatchingEngine.isRoamingData ( )

Returns if the bound Data Network for application is currently roaming or not.

Returns
boolean

◆ isWiFiCallingSupported()

boolean com.mobiledgex.matchingengine.MatchingEngine.isWiFiCallingSupported ( CarrierConfigManager  carrierConfigManager)

Checks if the Carrier + Phone combination supports WiFiCalling. This does not return whether it is enabled. If under roaming conditions, WiFi Calling may disable cellular network data interfaces needed by cellular data only Distributed Matching Engine and Cloudlet network operations.

Returns
boolean

◆ isWiFiEnabled()

boolean com.mobiledgex.matchingengine.MatchingEngine.isWiFiEnabled ( Context  context)

Returns whether Wifi is enabled on the system or not, independent of Application's network state.

Parameters
context(android.content.Context)
Returns
boolean