|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dracoware.rsplib.RspParser
public class RspParser
The RspParser
implements a common way of parsing stored RSP
history data. This object should be used to retrieve and work with stored
history data (from a MySQL database or a History Listener).
Field Summary | |
---|---|
static int |
PARSE_MYSQL
Data is stored in a MySQL database. |
static int |
PARSE_REMOTE
Data is stored in a History Listener database. |
Constructor Summary | |
---|---|
RspParser()
Constructs a new RspParser object. |
Method Summary | |
---|---|
void |
beginParse(java.lang.String host,
java.lang.String module,
java.lang.String key,
long beginTime,
long endTime,
boolean dataString)
Begins parsing data. |
void |
getHostsAndModules(java.util.Vector hosts,
java.util.Vector modules)
Connect to the server and get a list of hosts and modules from it. |
void |
getKeys(java.lang.String host,
java.lang.String module,
java.util.Vector keys)
Connect to the host and get a list of keys based on the given host and module. |
RspParseLine |
nextLine()
After calling the begin() method, use this method to return each successive incident found in the RSP history data. |
void |
parseInfoMySQL(java.lang.String host,
int port,
java.lang.String login,
java.lang.String password,
java.lang.String database,
int timeout)
If parsing history data from a MySQL database server, this method allows you to specify the necessary information to access the required data. |
void |
parseInfoRemote(java.lang.String host,
int port,
int timeout)
If parsing history data from a History Listener, this method allows you to specify the address and port of the History Listener server. |
void |
remoteUseSSL(java.io.File keyfile)
If parsing from a History Listener, this method specifies to connect secure with SSL. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PARSE_REMOTE
public static final int PARSE_MYSQL
Constructor Detail |
---|
public RspParser()
RspParser
object.
Method Detail |
---|
public void parseInfoRemote(java.lang.String host, int port, int timeout) throws RspParseException
host
- The address of the server.port
- The port of the server.timeout
- A timeout in seconds.
RspParseException
- If an error occurs, this is thrown with an error message.public void remoteUseSSL(java.io.File keyfile) throws RspParseException
keyfile
- Where the SSL keyfile is located, or if it doesn't exist, where it should be created.
RspParseException
- If an error occurs, this is thrown with an error message.public void parseInfoMySQL(java.lang.String host, int port, java.lang.String login, java.lang.String password, java.lang.String database, int timeout) throws RspParseException
host
- The address of the server.port
- The port of the server.login
- The user name to login with.password
- Password necessary to login with given the user name.database
- The name of the database containing the RSP history data.timeout
- A timeout in seconds.
RspParseException
- If an error occurs, this is thrown with an error message.public void getHostsAndModules(java.util.Vector hosts, java.util.Vector modules) throws RspParseException
hosts
- An empty Vector for hosts.modules
- An empty Vector for modules.
RspParseException
- If an error occurs, this is thrown with an error message.public void getKeys(java.lang.String host, java.lang.String module, java.util.Vector keys) throws RspParseException
host
- A specific host on the server.module
- A specific module on the server.keys
- An empty Vector for keys.
RspParseException
- If an error occurs, this is thrown with an error message.public void beginParse(java.lang.String host, java.lang.String module, java.lang.String key, long beginTime, long endTime, boolean dataString) throws RspParseException
host
- The host whose data we want to collect.module
- The module whose data will be collected.key
- If dataString is set to false, this is graph key whose data we will retrieve.beginTime
- The beginning of the window of time through which to look, in seconds since the epoch (UNIX time).endTime
- The end of the window of time through which to look, in seconds since the epoch (UNIX time).dataString
- Specifies if we want full data strings (if true) or graph data (if false).
RspParseException
- If an error occurs, this is thrown with an error message.public RspParseLine nextLine() throws RspParseException
RspParseException
- If an error occurs, this is thrown with an error message.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |