public interface HubManager
Modifier and Type | Method and Description |
---|---|
boolean |
authenticateHub(HubCredentials credentials)
Indicates whether Hub credentials are valid.
|
void |
deleteConfiguration(HubContext ctx)
Deletes the configuration associated with a Hub.
|
PropertyContainer |
getConfiguration(HubContext ctx)
Returns the configuration associated with a Hub.
|
PropertyContainerClass |
getConfigurationClass(HubContext ctx)
Returns the configuration class associated with a Hub.
|
PropertyContainerClass |
getContainerClass(PropertyContainerClassContext ctx)
Returns a published container class.
|
GlobalVariable |
getGlobalVariable(GlobalVariableContext gctx)
Returns a global variable.
|
java.util.Collection<GlobalVariable> |
getGlobalVariables(HubContext hctx)
Returns all global variables associated with a hub.
|
HobsonHub |
getHub(HubContext ctx)
Returns a specific hub.
|
java.util.Collection<HubContext> |
getHubs()
Returns all hubs the system knows about.
|
LocalHubManager |
getLocalManager()
Returns a manager for the local hub (if one exists).
|
LineRange |
getLog(HubContext ctx,
long startLine,
long endLine,
java.lang.Appendable appendable)
Returns content from the Hub log.
|
java.util.Collection<java.lang.String> |
getSerialPorts(HubContext hctx)
Returns a list of serial ports available on a Hub.
|
java.lang.String |
getUserIdForHubId(java.lang.String hubId)
Returns the user ID associated with the given hub ID.
|
java.lang.String |
getVersion(HubContext hubContext)
Returns the version of a specific hub.
|
boolean |
hasPropertyContainerClass(PropertyContainerClassContext ctx)
Indicates whether a property container class exists.
|
void |
sendEmail(HubContext ctx,
java.lang.String recipientAddress,
java.lang.String subject,
java.lang.String body)
Sends an e-mail message using the provided e-mail configuration.
|
void |
sendTestEmail(HubContext ctx,
PropertyContainer config)
Sends a test e-mail message using the provided e-mail configuration.
|
void |
setConfiguration(HubContext ctx,
PropertyContainer configuration)
Sets the configuration associated with a Hub.
|
void |
setGlobalVariable(GlobalVariableContext gctx,
java.lang.Object value,
long timestamp)
Sets a global variable.
|
void |
setGlobalVariables(java.util.Map<GlobalVariableContext,java.lang.Object> values,
long timestamp)
Sets multiple global variables.
|
java.lang.String getVersion(HubContext hubContext)
hubContext
- the context of the hubjava.util.Collection<HubContext> getHubs()
HobsonHub getHub(HubContext ctx)
ctx
- the context of the hub to retrievejava.lang.String getUserIdForHubId(java.lang.String hubId)
hubId
- the hub IDvoid deleteConfiguration(HubContext ctx)
ctx
- the context of the hubboolean authenticateHub(HubCredentials credentials)
credentials
- the credentials to validatePropertyContainerClass getConfigurationClass(HubContext ctx)
ctx
- the context of the hubPropertyContainer getConfiguration(HubContext ctx)
ctx
- the context of the hubPropertyContainerClass getContainerClass(PropertyContainerClassContext ctx)
ctx
- the context of the container class to returnboolean hasPropertyContainerClass(PropertyContainerClassContext ctx)
ctx
- the context of the container classLineRange getLog(HubContext ctx, long startLine, long endLine, java.lang.Appendable appendable)
ctx
- the context of the hub that owns the logsstartLine
- the starting line from the end of the file (e.g. 0 is the last line of the file)endLine
- the ending line from the end of the file (e.g. 0 is the last line of the file)appendable
- an Appendable to add the log content toLocalHubManager getLocalManager()
java.util.Collection<java.lang.String> getSerialPorts(HubContext hctx)
hctx
- the context of the hubvoid sendTestEmail(HubContext ctx, PropertyContainer config)
ctx
- the context of the target hubconfig
- an EmailConfiguration instanceHobsonInvalidRequestException
- if the e-mail configuration is invalidvoid sendEmail(HubContext ctx, java.lang.String recipientAddress, java.lang.String subject, java.lang.String body)
ctx
- the context of the target hubrecipientAddress
- the e-mail address of the recipientsubject
- the e-mail subject linebody
- the e-mail message bodyvoid setConfiguration(HubContext ctx, PropertyContainer configuration)
ctx
- the context of the hubconfiguration
- the configuration to setvoid setGlobalVariable(GlobalVariableContext gctx, java.lang.Object value, long timestamp)
gctx
- the variable contextvalue
- the new valuetimestamp
- the timestamp associated with the new valuevoid setGlobalVariables(java.util.Map<GlobalVariableContext,java.lang.Object> values, long timestamp)
values
- the variable valuestimestamp
- the timestamp associated with the new valuesGlobalVariable getGlobalVariable(GlobalVariableContext gctx)
gctx
- the variable contextjava.util.Collection<GlobalVariable> getGlobalVariables(HubContext hctx)
hctx
- the hub contextCopyright © 2015 Whizzo Software LLC. All rights reserved.