public class McvStateCollector extends Object implements StateCollector
Modifier and Type | Field and Description |
---|---|
private static String |
BUNDLE
Name of the attachment used for the system state bundle.
|
private static String |
EXTRA
Name of the attachment used for system properties.
|
private McIDASV |
mcv
Reference used to query McIDAS-V's application state.
|
Constructor and Description |
---|
McvStateCollector(McIDASV mcv)
Builds a state collector that knows how to query McIDAS-V for specific
information.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBundleState()
Whether or not this
StateCollector allows for attaching current
McIDAS-V state as a bundle. |
String |
getBundleAttachmentName()
What should the name of the bundled version of McIDAS-V's current state
be named?
|
byte[] |
getBundledState()
Current McIDAS-V state as an XML bundle named by
getBundleAttachmentName() . |
byte[] |
getContents()
The results of
getContentsAsString() as an array of byte s. |
String |
getContentsAsString()
Builds the McIDAS-V system properties and returns the results as a
nicely formatted
String . |
String |
getExtraAttachmentName()
What should the set of McIDAS-V system properties be named?
|
String |
getLogPath()
Return full path to McV log file
|
String |
getPrefsPath()
Return full path to user's startup preferences file.
|
String |
toString() |
private static final String BUNDLE
private static final String EXTRA
public McvStateCollector(McIDASV mcv)
mcv
- The McIDAS-V reference that we'll interrogate.public String getBundleAttachmentName()
getBundleAttachmentName
in interface StateCollector
public String getExtraAttachmentName()
getExtraAttachmentName
in interface StateCollector
public String getLogPath()
getLogPath
in interface StateCollector
public String getPrefsPath()
getPrefsPath
in interface StateCollector
public String getContentsAsString()
String
.getContentsAsString
in interface StateCollector
KEY=VALUE\n
. This is so we kinda-sorta conform to the standard
Properties
file format.public byte[] getContents()
getContentsAsString()
as an array of byte
s.
This makes for a particularly easy way to attach to a HTTP POST
.getContents
in interface StateCollector
public String toString()
toString
in interface StateCollector
toString
in class Object
public boolean canBundleState()
StateCollector
allows for attaching current
McIDAS-V state as a bundle.canBundleState
in interface StateCollector
public byte[] getBundledState()
getBundleAttachmentName()
.getBundledState
in interface StateCollector