Skip navigation links

Package org.apache.edgent.providers.iot

Iot provider that allows multiple applications to share an IotDevice.

See: Description

Package org.apache.edgent.providers.iot Description

Iot provider that allows multiple applications to share an IotDevice.

IoT device

Application registration

The provider includes an ApplicationService that allows applications to be registered by name. Once registered an application can be started (and stopped) remotely through the control service using a device command.

Supported device commands

This provider supports a number of system level device commands to control the applications running within it.

Control service

Device commands with the command identifier 'edgentControl' are sent to the provider's control service, an instance of JsonControlService. This allows invocation of an operation against a control mbean registered with the control service, either by an application or the provider itself.
The command's data (JSON) uniquely identifies a control MBean through its type and alias, and indicates the operation to call on the MBean and the arguments to pass to the operation.
Thus any control operation can be remotely invoked through a edgentControl device command, including arbitrary control mbeans registered by applications.

Provider operations

OperationCommand identifier typealiasopargs Control MBean
Submit (start) a registered application edgentControl appService edgent submit [applicationName, configJSONObject] ApplicationServiceMXBean
Sample command data {"type":"appService","alias":"edgent","op":"submit","args":["Heartbeat",{}]}
Close (stop) a running registered application edgentControl job applicationName stateChange ["CLOSE"] JobMXBean
Sample command data {"type":"job","alias":"Heartbeat","op":"stateChange","args":["CLOSE"]}
Skip navigation links
Apache Edgent (incubating)

Copyright © 2017 The Apache Software Foundation. All Rights Reserved - 4744f56-20170226-1707