public class InteropClientImpl extends Object implements InteropClient
Constructor and Description |
---|
InteropClientImpl(DesktopConnection conn,
String brokerName) |
Modifier and Type | Method and Description |
---|---|
CompletionStage<Void> |
addContextListener(ContextListener contextListener)
Adds a context listener for incoming context.
|
CompletionStage<Void> |
addContextListener(String contextType,
ContextListener listener)
Adds a context listener for incoming context of specified context type.
|
CompletionStage<Void> |
fireIntent(Intent intent)
Sends an intent to the Interop Broker to resolve.
|
CompletionStage<ClientIdentity[]> |
getAllClientsInContextGroup(String contextGroupId)
Gets all clients for a context group.
|
CompletionStage<ContextGroupInfo[]> |
getContextGroups()
Gets the Interop-Broker-defined context groups available for an entity to join.
|
CompletionStage<ContextGroupInfo> |
getInfoForContextGroup(String contextGroupId)
Gets display info for a context group.
|
CompletionStage<Void> |
joinContextGroup(String contextGroupId)
Joins this InteropClient to the context group.
|
CompletionStage<Void> |
joinContextGroup(String contextGroupId,
Identity target)
Joins specified InteropClient to the context group.
|
CompletionStage<Void> |
registerIntentListener(String intentName,
IntentListener intentListener)
Register an intent listener for incoming intent.
|
CompletionStage<Void> |
removeContextListener(ContextListener contextListener)
Removes the context listener.
|
CompletionStage<Void> |
removeContextListener(String contextType,
ContextListener listener)
Remove the context listener of specified context type.
|
CompletionStage<Void> |
removeFromContextGroup()
Removes this InteropClient from the context group it currently joined.
|
CompletionStage<Void> |
removeFromContextGroup(Identity target)
Removes specified InteropClient from the context group it currently joined.
|
CompletionStage<Void> |
setContext(Context context)
Sets a context for the context group of the current entity.
|
public InteropClientImpl(DesktopConnection conn, String brokerName)
public CompletionStage<Void> setContext(Context context)
InteropClient
setContext
in interface InteropClient
context
- New context to set.public CompletionStage<Void> addContextListener(ContextListener contextListener)
InteropClient
addContextListener
in interface InteropClient
contextListener
- The listener for incoming context.public CompletionStage<Void> addContextListener(String contextType, ContextListener listener)
InteropClient
addContextListener
in interface InteropClient
contextType
- The context type to listen to.listener
- The listener for incoming context.public CompletionStage<Void> removeContextListener(ContextListener contextListener)
InteropClient
removeContextListener
in interface InteropClient
contextListener
- The listener to be removed.public CompletionStage<Void> removeContextListener(String contextType, ContextListener listener)
InteropClient
removeContextListener
in interface InteropClient
contextType
- The context type that the listener is listened to.listener
- The listener to be removed.public CompletionStage<ContextGroupInfo[]> getContextGroups()
InteropClient
getContextGroups
in interface InteropClient
public CompletionStage<Void> joinContextGroup(String contextGroupId)
InteropClient
joinContextGroup
in interface InteropClient
contextGroupId
- The id of context group.public CompletionStage<Void> joinContextGroup(String contextGroupId, Identity target)
InteropClient
joinContextGroup
in interface InteropClient
contextGroupId
- The id of context group.target
- The identity of the target InteropClient.public CompletionStage<Void> removeFromContextGroup()
InteropClient
removeFromContextGroup
in interface InteropClient
public CompletionStage<Void> removeFromContextGroup(Identity target)
InteropClient
removeFromContextGroup
in interface InteropClient
target
- The identity of the target InteropClient.public CompletionStage<ClientIdentity[]> getAllClientsInContextGroup(String contextGroupId)
InteropClient
getAllClientsInContextGroup
in interface InteropClient
contextGroupId
- The id of context group.public CompletionStage<ContextGroupInfo> getInfoForContextGroup(String contextGroupId)
InteropClient
getInfoForContextGroup
in interface InteropClient
contextGroupId
- The id of context group.public CompletionStage<Void> fireIntent(Intent intent)
InteropClient
fireIntent
in interface InteropClient
intent
- New intent to send.public CompletionStage<Void> registerIntentListener(String intentName, IntentListener intentListener)
InteropClient
registerIntentListener
in interface InteropClient
intentName
- name of the intentintentListener
- The listener for incoming intent.Copyright © 2022. All rights reserved.