public class DeviceContext
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GLOBAL |
Modifier and Type | Method and Description |
---|---|
static DeviceContext |
create(HubContext hubContext,
java.lang.String pluginId,
java.lang.String deviceId)
Creates a device context.
|
static DeviceContext |
create(PluginContext ctx,
java.lang.String deviceId)
Creates a device context.
|
static DeviceContext |
create(java.lang.String s)
Creates a device context.
|
static java.util.Collection<DeviceContext> |
createCollection(java.lang.String s)
Creates a collection of device contexts.
|
static DeviceContext |
createGlobal(PluginContext ctx)
Creates a global device context.
|
static DeviceContext |
createLocal(java.lang.String pluginId,
java.lang.String deviceId)
Creates a local device context.
|
static DeviceContext |
createLocalGlobal(java.lang.String pluginId)
Creates a local global device context.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getDeviceId() |
HubContext |
getHubContext() |
java.lang.String |
getHubId() |
PluginContext |
getPluginContext() |
java.lang.String |
getPluginId() |
boolean |
hasDeviceId() |
int |
hashCode() |
boolean |
isGlobal() |
java.lang.String |
toString() |
public static final java.lang.String GLOBAL
public static DeviceContext create(PluginContext ctx, java.lang.String deviceId)
ctx
- the plugin context associated with the devicedeviceId
- the device IDpublic static DeviceContext create(HubContext hubContext, java.lang.String pluginId, java.lang.String deviceId)
hubContext
- the context of the hub that published the devicepluginId
- the ID of the plugin that published the devicedeviceId
- the ID of the devicepublic static DeviceContext create(java.lang.String s)
s
- a String generated from DeviceContext's toString() methodpublic static java.util.Collection<DeviceContext> createCollection(java.lang.String s)
s
- a comma-separated list of Strings generated from DeviceContext's toString() methodpublic static DeviceContext createGlobal(PluginContext ctx)
ctx
- the context of the pluginpublic static DeviceContext createLocal(java.lang.String pluginId, java.lang.String deviceId)
pluginId
- the ID of the plugin that published the devicedeviceId
- the ID of the devicepublic static DeviceContext createLocalGlobal(java.lang.String pluginId)
pluginId
- the plugin associated with the global devicepublic HubContext getHubContext()
public PluginContext getPluginContext()
public java.lang.String getHubId()
public java.lang.String getPluginId()
public boolean hasDeviceId()
public java.lang.String getDeviceId()
public boolean isGlobal()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2015 Whizzo Software LLC. All rights reserved.