|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hackystat.sensor.xmldata.option.OptionUtil
public class OptionUtil
The option utility class that contains methods used by multiple options.
Method Summary | |
---|---|
static org.hackystat.sensorshell.Shell |
createShell(org.hackystat.sensorshell.SensorShellProperties properties,
XmlDataController controller)
Creates a Shell instance based on the information found in the specified controller. |
static javax.xml.bind.Unmarshaller |
createUnmarshaller(java.lang.Class<?> contextClass,
java.lang.String schemaFileName)
The helper method that returns an unmarshaller that is created using the specified JAXB context class and schema file. |
static void |
fireSendMessage(XmlDataController controller,
org.hackystat.sensorshell.Shell shell,
int entriesAdded)
The helper method that fires a message to the specified controller based on the connectivity of the sensorshell to a Hackystat server. |
static javax.xml.datatype.XMLGregorianCalendar |
getCurrentTimestamp(boolean isUnique,
org.hackystat.utilities.tstamp.TstampSet tstampSet)
Returns the current timestamp based on the specified parameters. |
static java.lang.String |
getMapVerboseString(java.util.Map<java.lang.String,java.lang.String> keyValMap)
Returns the string containing the information stored in the key-value mapping of sensor data. |
static long |
getTimestampInMillis(java.lang.String timestamp)
Returns the long value of the specified timestamp string representation. |
static javax.xml.datatype.XMLGregorianCalendar |
massageTimestamp(java.lang.Boolean isUnique,
org.hackystat.utilities.tstamp.TstampSet tstampSet,
long timestamp)
"Massages" the specified timestamp by using the specified parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getMapVerboseString(java.util.Map<java.lang.String,java.lang.String> keyValMap)
keyValMap
- the map used to generate the returned string.
public static long getTimestampInMillis(java.lang.String timestamp) throws java.lang.Exception
timestamp
- the specified string representation of a timestamp.
java.lang.Exception
- thrown if the specified timestamp string is not in a
valid SimpleDateFormat.public static javax.xml.datatype.XMLGregorianCalendar getCurrentTimestamp(boolean isUnique, org.hackystat.utilities.tstamp.TstampSet tstampSet)
isUnique
- if this is true, a unique timestamp, based on the specified
tstampSet, is returned.tstampSet
- the set of timestamps that is managed to ensure that a
unique timestamp is generated.
public static javax.xml.datatype.XMLGregorianCalendar massageTimestamp(java.lang.Boolean isUnique, org.hackystat.utilities.tstamp.TstampSet tstampSet, long timestamp)
isUnique
- if this is true, the specified timestamp is changed to be
unique based on the specified tstampSet.tstampSet
- the set of timestamps that is managed to ensure that a
unique timestamp is generated.timestamp
- the timestamp to massage.
public static javax.xml.bind.Unmarshaller createUnmarshaller(java.lang.Class<?> contextClass, java.lang.String schemaFileName) throws javax.xml.bind.JAXBException, org.xml.sax.SAXException, java.net.MalformedURLException
contextClass
- the specified context class used to build the
unmarshaller.schemaFileName
- the schema file that adds schema validation to the
unmarshaller.
javax.xml.bind.JAXBException
- thrown if there is a problem creating the
unmarshaller with the specified context class.
org.xml.sax.SAXException
- thrown if there is a problem adding schema validation
with the specified schema file.
java.net.MalformedURLException
- thrown if there is a problem finding the xsd
schema directory.public static void fireSendMessage(XmlDataController controller, org.hackystat.sensorshell.Shell shell, int entriesAdded)
controller
- the controller that the message is fired to.shell
- the shell used to test the connectivity of the Hackystat
server.entriesAdded
- the number of entries added to the specified shell.public static org.hackystat.sensorshell.Shell createShell(org.hackystat.sensorshell.SensorShellProperties properties, XmlDataController controller) throws java.lang.Exception
properties
- the properties used to create the shell instance.controller
- the controller that contains the information used to
determine which shell to use.
java.lang.Exception
- thrown if there is a problem instantiating a
MultiSensorShell instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |