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 bytes. |
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() |
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 StateCollectorpublic String getExtraAttachmentName()
getExtraAttachmentName in interface StateCollectorpublic String getLogPath()
getLogPath in interface StateCollectorpublic String getContentsAsString()
String.getContentsAsString in interface StateCollectorKEY=VALUE\n. This is so we kinda-sorta conform to the standard
Properties file format.public byte[] getContents()
getContentsAsString() as an array of bytes.
This makes for a particularly easy way to attach to a HTTP POST.getContents in interface StateCollectorpublic String toString()
toString in interface StateCollectortoString in class Objectpublic boolean canBundleState()
StateCollector allows for attaching current
McIDAS-V state as a bundle.canBundleState in interface StateCollectorpublic byte[] getBundledState()
getBundleAttachmentName().getBundledState in interface StateCollector