Modifier and Type | Field and Description |
---|---|
static String |
MARS_ADDRESS_PROPERTY |
static String |
MARS_ROOT_PROPERTY |
Constructor and Description |
---|
MARSNode(MARS mars,
String name)
Creates new node for specified
MARS instance and name. |
Modifier and Type | Method and Description |
---|---|
static String |
generateUniqueName()
Generates new unique name useful to distinguish conflicting nodes.
|
String |
getCategory()
Returns category of this node or null if unspecified.
|
String |
getDescription()
Returns description of this node or null if unspecified.
|
double |
getDoubleValue()
Returns double value of this node or
Double.NaN if unspecified or unparseable. |
int |
getIntValue()
Returns integer value of this node or 0 if unspecified or unparseable.
|
MARS |
getMars()
Returns
MARS instance of this node. |
String |
getName()
Returns name of this node.
|
static MARSNode |
getRoot()
Returns default singleton root node for this JVM.
|
String |
getStatus()
Returns status of this node or null if unspecified.
|
long |
getTimeValue()
Returns time value of this node or 0 if unspecified or unparseable.
|
long |
getTimeValue(TimeZone time_zone)
Returns time value of this node or 0 if unspecified or unparseable.
|
String |
getValue()
Returns unparsed value of this node or null if unspecified.
|
void |
remove() |
void |
setCategory(String category)
Sets new category of this node; does nothing if null is specified.
|
void |
setDescription(String description)
Sets new description of this node; does nothing if null is specified.
|
void |
setDoubleValue(double value) |
void |
setDoubleValue(double value,
long timestamp)
Sets new double value of this node.
|
void |
setIntValue(int value)
Sets new integer value of this node.
|
void |
setIntValue(int value,
long timestamp) |
static void |
setRoot(MARSNode root)
Deprecated.
Use "-Dmars.root=
|
void |
setStatus(MARSStatus marsStatus)
Sets new status of this node; does nothing if null is specified.
|
void |
setStatus(MARSStatus marsStatus,
long timestamp) |
void |
setStatus(MARSStatus marsStatus,
String statusMessage)
Sets new status of this node; does nothing if marsStatus == null is specified.
|
void |
setStatus(MARSStatus marsStatus,
String statusMessage,
long timestamp) |
void |
setStatus(String status)
Deprecated.
use
setStatus(MARSStatus) or setStatus(MARSStatus, String) instead of this method. |
void |
setTimeValue(long value) |
void |
setTimeValue(long value,
long timestamp)
Sets new time value of this node using system default time zone.
|
void |
setTimeValue(long value,
TimeZone timeZone) |
void |
setTimeValue(long value,
TimeZone timeZone,
long timestamp)
Sets new time value of this node using specified time zone.
NOTE: method is synchronized because date formatters are not thread-safe in general. |
void |
setValue(String value)
Sets new unparsed value of this node; does nothing if null is specified.
|
void |
setValue(String value,
long timestamp) |
MARSNode |
subNode(String subname)
Returns subnode for specified subname applied to this node.
|
MARSNode |
subNode(String subname,
String description)
Returns subnode for specified subname applied to this node with specified description.
|
MARSNode |
subNode(String subname,
String category,
String description)
Returns subnode for specified subname applied to this node with specified category and description.
|
String |
toString() |
public static final String MARS_ROOT_PROPERTY
public static final String MARS_ADDRESS_PROPERTY
public static MARSNode getRoot()
MARS_ROOT_PROPERTY
and MARS_ADDRESS_PROPERTY
.
It is created on first use.
This method is a shortcut to MARSEndpoint
.getInstance
().getRoot
().public static void setRoot(MARSNode root)
public static String generateUniqueName()
public MARSNode subNode(String subname)
public MARSNode subNode(String subname, String description)
public MARSNode subNode(String subname, String category, String description)
public String getName()
public String getCategory()
public void setCategory(String category)
public String getDescription()
public void setDescription(String description)
public String getStatus()
public void setStatus(String status)
public void setStatus(MARSStatus marsStatus)
public void setStatus(MARSStatus marsStatus, long timestamp)
public void setStatus(MARSStatus marsStatus, String statusMessage)
public void setStatus(MARSStatus marsStatus, String statusMessage, long timestamp)
public String getValue()
public void setValue(String value)
value
- new valuepublic void setValue(String value, long timestamp)
public int getIntValue()
public void setIntValue(int value)
public void setIntValue(int value, long timestamp)
public double getDoubleValue()
Double.NaN
if unspecified or unparseable.public void setDoubleValue(double value, long timestamp)
public void setDoubleValue(double value)
public long getTimeValue()
public long getTimeValue(TimeZone time_zone)
time_zone
- default time zone to be used if value has none.public void setTimeValue(long value, long timestamp)
public void setTimeValue(long value)
public void setTimeValue(long value, TimeZone timeZone, long timestamp)
public void setTimeValue(long value, TimeZone timeZone)
public void remove()
Copyright © 2015 Devexperts. All Rights Reserved.