public interface RemoteInteraction

Known direct subclasses
EspressoRemote

A singleton class that facilitates communication between other Espresso instance that may be running in different processes.

NoopRemoteInteraction

Noop RemoteInteraction object


Facilitates communication between other Espresso instance that may be running in different processes.

Summary

Constants

default static final String
BUNDLE_EXECUTION_STATUS = "executionStatus"

Public methods

abstract Callable<Void>
createRemoteCheckCallable(
    Matcher<Root> rootMatcher,
    Matcher<View> viewMatcher,
    Map<StringIBinder> iBinders,
    ViewAssertion viewAssert
)

Creates a callable to run Espresso check interaction on remote processes

abstract Callable<Void>
createRemotePerformCallable(
    Matcher<Root> rootMatcher,
    Matcher<View> viewMatcher,
    Map<StringIBinder> iBinders,
    ViewAction[] viewActions
)

Creates a callable to run a perform interaction on remote processes.

default boolean

Returns {code true} if the current Espresso instance is communicating with another Espresso instance in a remote process.

abstract boolean

Returns true if the current Espresso instance running in a remote process.

Constants

BUNDLE_EXECUTION_STATUS

default static final String BUNDLE_EXECUTION_STATUS = "executionStatus"

Public methods

createRemoteCheckCallable

abstract Callable<VoidcreateRemoteCheckCallable(
    Matcher<Root> rootMatcher,
    Matcher<View> viewMatcher,
    Map<StringIBinder> iBinders,
    ViewAssertion viewAssert
)

Creates a callable to run Espresso check interaction on remote processes

The caller is expected to schedule the task to run.

Parameters
Matcher<Root> rootMatcher

the root matcher to use.

Matcher<View> viewMatcher

the view matcher to use.

Map<StringIBinder> iBinders

a list of binders to pass along to the remote process instance

ViewAssertion viewAssert

the view assertion to use.

Returns
Callable<Void>

a Callable that will perform the check pending completion of the task.

createRemotePerformCallable

abstract Callable<VoidcreateRemotePerformCallable(
    Matcher<Root> rootMatcher,
    Matcher<View> viewMatcher,
    Map<StringIBinder> iBinders,
    ViewAction[] viewActions
)

Creates a callable to run a perform interaction on remote processes.

If there no remote Espresso currently running in a timely manner the interaction will not be executed and a NoRemoteEspressoInstanceException will be thrown.

Parameters
Matcher<Root> rootMatcher

the root matcher to use.

Matcher<View> viewMatcher

the view matcher to use.

Map<StringIBinder> iBinders

a list of binders to pass along to the remote process instance

ViewAction[] viewActions

one or more actions to execute.

Returns
Callable<Void>

a Callable that performs the action.

isRemoteClient

default boolean isRemoteClient()

Returns {code true} if the current Espresso instance is communicating with another Espresso instance in a remote process.

isRemoteProcess

abstract boolean isRemoteProcess()

Returns true if the current Espresso instance running in a remote process.