public class McvStateCollector extends java.lang.Object implements StateCollector
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
BUNDLE
Name of the attachment used for the system state bundle.
|
private static java.lang.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. |
java.lang.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. |
java.lang.String |
getContentsAsString()
Builds the McIDAS-V system properties and returns the results as a
nicely formatted
String . |
java.lang.String |
getExtraAttachmentName()
What should the set of McIDAS-V system properties be named?
|
java.lang.String |
getLogPath()
Return full path to McV log file
|
java.lang.String |
getPrefsPath()
Return full path to user's startup preferences file.
|
java.lang.String |
getResolvSrvPath()
Get the path to where the user's
RESOLV.SRV file should
be located. |
java.lang.String |
toString() |
private static final java.lang.String BUNDLE
private static final java.lang.String EXTRA
public McvStateCollector(McIDASV mcv)
mcv
- The McIDAS-V reference that we'll interrogate.public java.lang.String getBundleAttachmentName()
getBundleAttachmentName
in interface StateCollector
public java.lang.String getExtraAttachmentName()
getExtraAttachmentName
in interface StateCollector
public java.lang.String getLogPath()
getLogPath
in interface StateCollector
public java.lang.String getPrefsPath()
getPrefsPath
in interface StateCollector
public java.lang.String getResolvSrvPath()
RESOLV.SRV
file should
be located.getResolvSrvPath
in interface StateCollector
RESOLV.SRV
. Note: the file may not exist!public java.lang.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 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
public java.lang.String toString()
toString
in interface StateCollector
toString
in class java.lang.Object