public abstract class RemoteCommand
extends java.lang.Object
Tealium.addRemoteCommand(RemoteCommand)
.Modifier and Type | Class and Description |
---|---|
static class |
RemoteCommand.Response
This class allows a
RemoteCommand respond to a TagBridge request. |
Constructor and Description |
---|
RemoteCommand(java.lang.String commandId,
java.lang.String description)
Remote command constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
onInvoke(RemoteCommand.Response remoteCommandResponse)
Execution block for the TagBridge command.
|
public RemoteCommand(java.lang.String commandId, java.lang.String description)
commandId
- a URL domain name compliant command id to be called from
TagBridge. This will be lower-cased.description
- a brief explanation of the purpose behind the remote command
to be viewed in LogCat and Mobile Companion.java.lang.IllegalArgumentException
- When mCommandId is null or mCommandId does not match the Regex
"^[\w-]*$".protected abstract void onInvoke(RemoteCommand.Response remoteCommandResponse) throws java.lang.Exception
RemoteCommand.Response.send()
for the TealiumIQ
callback can be invoked. If an exception is thrown inside of this
implementation, the library will perform the callback, so please only
call send() on completion.remoteCommandResponse
- a RemoteCommand.Response
object. It's methods possess request
arguments and response capabilities.java.lang.Throwable
- the library will call RemoteCommand.Response.send()
with a status
of 555 and provide a stack-trace as the body.java.lang.Exception