com.bmc.mainview.nvbapi
Class LiveConv

java.lang.Object
  extended by com.bmc.mainview.nvbapi.Conversation
      extended by com.bmc.mainview.nvbapi.LiveConv

public class LiveConv
extends Conversation

A conversation with a host server.

One is created to send a series of requests and receive the responses.

Version:
2.0
Author:
F. Schneider
See Also:
LiveServer

Field Summary
 
Fields inherited from class com.bmc.mainview.nvbapi.Conversation
HYPERLINKLEVEL, MAPPED, status, TAGGED
 
Constructor Summary
LiveConv(LiveServer hst)
           
LiveConv(LiveServer hst, java.lang.String monitorID)
           
 
Method Summary
 XML access(java.lang.String context, java.lang.String system, java.lang.String server, java.lang.String product)
          Sets the target that this conversation will send requests to.
 void actionExecute(int row, java.lang.String command)
          Requests that a product action be performed.
 void actionExecute(int row, java.lang.String command, java.lang.String parm)
          Requests that a product action be performed.
 void actionExecute(int row, java.lang.String command, java.lang.String[] parms)
          Requests that a product action be performed.
 void actionExecute(java.lang.String command)
          Requests that a product action be performed.
 void actionExecute(java.lang.String command, java.lang.String parm)
          Requests that a product action be performed.
 void actionExecute(java.lang.String command, java.lang.String[] parms)
          Requests that a product action be performed.
 void close()
          Terminates the conversation
 XML dataGet(int type, java.lang.String startrow, java.lang.String numRows, java.lang.String qwhere, java.lang.String where)
          Retrieve the data from the current view
 void dictionarySet(java.lang.String symbol, java.lang.String value)
          Sets a dictionary symbol in the host.
 java.lang.String[] extractMessages()
          Retrieve any messages set by a preceding request.
 java.lang.String extractSymbol(java.lang.String symbol)
          One of the side effects of an action is to set a symbol.
 HostServer getHost()
           
 XML mapGet(boolean hyperlinks)
          Returns the list of fields and their location in MAPPED data for the current view
 XML send(XML req)
           
 void setTimeout(int timeout)
          Set the amount of time to wait for a response from the host.
 void streamSend(java.lang.String name, java.lang.String stream)
          Send a data stream to the back end.
 void timeSet()
          Gives access to the historical data stored on the mainframe.
 void timeSet(long time)
          Gives access to the historical data stored on the mainframe
 void timeSet(java.lang.String time)
          Gives access to the historical data stored on the mainframe.
 void timeSet(java.lang.String time, java.lang.String date)
          Gives access to the historical data stored on the mainframe.
 void timeSet(java.lang.String time, java.lang.String date, java.lang.String duration)
          A single interval is assumed.
 void timeSet(java.lang.String time, java.lang.String date, java.lang.String duration, java.lang.String units)
          Gives access to the historical data stored on the mainframe
 java.lang.String toString()
           
 
Methods inherited from class com.bmc.mainview.nvbapi.Conversation
access, addListener, dataGet, dataGet, dataGet, getCurrentView, getTimeout, mapGet, removeListener, setCurrentView, setRefreshOff, setRefreshOn, viewSet, viewSet, viewSet, viewSet, viewSet, viewSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LiveConv

public LiveConv(LiveServer hst,
                java.lang.String monitorID)
         throws java.io.IOException
Throws:
java.io.IOException

LiveConv

public LiveConv(LiveServer hst)
         throws java.io.IOException
Throws:
java.io.IOException
Method Detail

setTimeout

public void setTimeout(int timeout)
                throws java.net.SocketException
Description copied from class: Conversation
Set the amount of time to wait for a response from the host.

Overrides:
setTimeout in class Conversation
Parameters:
timeout - the timeout delay in milliseconds.
Throws:
java.net.SocketException

access

public XML access(java.lang.String context,
                  java.lang.String system,
                  java.lang.String server,
                  java.lang.String product)
           throws java.io.IOException
Description copied from class: Conversation
Sets the target that this conversation will send requests to.

Specified by:
access in class Conversation
Parameters:
context - the MVI defined context to be used
system - The zOS system name
server - The job name of the PAS (Product Address Space)
product - The MVI product whose views are to be used
Returns:
an XML structure of a "status" element which has the following attributes:
  • state - the registered name of the product, e.g. MVMVS, being accessed
  • ssi - "y|n"
  • provider-level - DataBus level of product selector side where the data is produced. The minimum level to support Threshold Advisor is 9
  • target - target or context name of the product being accessed
  • version - current version number of the NVBAPI
  • api-level - APAR number to indicate certain features are supported by the NVBAPI Server
  • product - registered ID of the product being accessed
  • number-msg - number of messages currently available
  • last-cc - completion code of the last request
  • requestor-level - DataBus level of server side/front-end where the result XML is formatted. The minimum level to support Threshold Advisor is 9.
Throws:
java.io.IOException
See Also:
ServicePoint

timeSet

public void timeSet(long time)
             throws java.io.IOException
Description copied from class: Conversation
Gives access to the historical data stored on the mainframe

Specified by:
timeSet in class Conversation
Parameters:
time - The data and time from which the data is to be retrieved
Throws:
java.io.IOException

timeSet

public void timeSet()
             throws java.io.IOException
Gives access to the historical data stored on the mainframe. Current time, date and a single interval are assumed.

Throws:
java.io.IOException

timeSet

public void timeSet(java.lang.String time)
             throws java.io.IOException
Gives access to the historical data stored on the mainframe. Current date and a single interval are assumed.

Parameters:
time - = ”current | * | = | hh:mm:ss”
"current" — the current time; the default
"*" — the current time
"=" — the time from a preceding TIME request
"hh:mm:ss" — a specific time
Throws:
java.io.IOException

timeSet

public void timeSet(java.lang.String time,
                    java.lang.String date)
             throws java.io.IOException
Gives access to the historical data stored on the mainframe. units=”intervals" and duration="1" are assumed.

Parameters:
time - = ”current | * | = | hh:mm:ss”
"current" — the current time; the default
"*" — the current time
"=" — the time from a preceding TIME request
"hh:mm:ss" — a specific time
date - = "current | * | = | ddmmyyyy”"
"current" — the current date; the default
"*" — the current date
"=" — the date from a preceding DATE request
"ddmmyyyy" — a specific date
Throws:
java.io.IOException

timeSet

public void timeSet(java.lang.String time,
                    java.lang.String date,
                    java.lang.String duration)
             throws java.io.IOException
A single interval is assumed.

Parameters:
time - = ”current | * | = | hh:mm:ss”
"current" — the current time; the default
"*" — the current time
"=" — the time from a preceding TIME request
"hh:mm:ss" — a specific time
date - = "current | * | = | ddmmyyyy”"
"current" — the current date; the default
"*" — the current date
"=" — the date from a preceding DATE request
"ddmmyyyy" — a specific date
duration - = ”1 | nnn | prev | next | * | =”
"1" — one unit of time; the default
"prev" — set time to previous time interval
"next" — set time to next time interval
"*" — one unit of time
"=" —the unit from a preceding DURATION request
Throws:
java.io.IOException

timeSet

public void timeSet(java.lang.String time,
                    java.lang.String date,
                    java.lang.String duration,
                    java.lang.String units)
             throws java.io.IOException
Gives access to the historical data stored on the mainframe

Parameters:
time - the desired time; this is a request for the ending interval containing this time
time = ”current | * | = | hh:mm:ss”
"current" — the current time; the default
"*" — the current time
"=" — the time from a preceding TIME request
"hh:mm:ss" — a specific time
date - the desired date; this is a request for the ending interval containing this date
date = "current | * | = | ddmmyyyy”"
"current" — the current date; the default
"*" — the current date
"=" — the date from a preceding DATE request
"ddmmyyyy" — a specific date
duration - the number of “units” of time to be included; the unit is specified with the units attribute
duration = ”1 | nnn | prev | next | * | =”
"1" — one unit of time; the default
"prev" — set time to previous time interval
"next" — set time to next time interval
"*" — one unit of time
"=" —the unit from a preceding DURATION request
units - defines what a unit is for the duration attribute
units=”intervals | minutes | hours | days”
"intervals" — a unit is product and installation specific; this is the default
"minutes" — a unit is this number of minutes
"hours" — a unit is this number of hours
"days" — a unit is this number of days
Throws:
java.io.IOException

actionExecute

public void actionExecute(java.lang.String command)
                   throws java.io.IOException
Description copied from class: Conversation
Requests that a product action be performed.

Specified by:
actionExecute in class Conversation
Throws:
java.io.IOException

actionExecute

public void actionExecute(java.lang.String command,
                          java.lang.String parm)
                   throws java.io.IOException
Description copied from class: Conversation
Requests that a product action be performed.

Specified by:
actionExecute in class Conversation
Throws:
java.io.IOException

actionExecute

public void actionExecute(java.lang.String command,
                          java.lang.String[] parms)
                   throws java.io.IOException
Description copied from class: Conversation
Requests that a product action be performed.

Specified by:
actionExecute in class Conversation
Throws:
java.io.IOException

actionExecute

public void actionExecute(int row,
                          java.lang.String command)
                   throws java.io.IOException
Description copied from class: Conversation
Requests that a product action be performed.

Specified by:
actionExecute in class Conversation
Throws:
java.io.IOException

actionExecute

public void actionExecute(int row,
                          java.lang.String command,
                          java.lang.String parm)
                   throws java.io.IOException
Description copied from class: Conversation
Requests that a product action be performed.

Specified by:
actionExecute in class Conversation
Throws:
java.io.IOException

actionExecute

public void actionExecute(int row,
                          java.lang.String command,
                          java.lang.String[] parms)
                   throws java.io.IOException
Description copied from class: Conversation
Requests that a product action be performed.

Specified by:
actionExecute in class Conversation
Throws:
java.io.IOException

dataGet

public XML dataGet(int type,
                   java.lang.String startrow,
                   java.lang.String numRows,
                   java.lang.String qwhere,
                   java.lang.String where)
            throws java.io.IOException
Description copied from class: Conversation
Retrieve the data from the current view

Specified by:
dataGet in class Conversation
Parameters:
type - Either TAGGED or MAPPED
startrow - First row to be retrieved
numRows - How many rows to retrieve
qwhere - A MAINVIEW QWHERE clause to filter the query (max length=1024)
where - A MAINVIEW WHERE clause to filter the rows (max length=1024)
Returns:
An XML structure of a data element with multiple row sub-elements
Throws:
java.io.IOException - in case of error.
See Also:
Conversation.dataGet(int)

extractMessages

public java.lang.String[] extractMessages()
                                   throws java.io.IOException
Retrieve any messages set by a preceding request.

Specified by:
extractMessages in class Conversation
Returns:
An array of messages
Throws:
java.io.IOException

extractSymbol

public java.lang.String extractSymbol(java.lang.String symbol)
                               throws java.io.IOException
One of the side effects of an action is to set a symbol.

Specified by:
extractSymbol in class Conversation
Parameters:
symbol -
Returns:
The value of the symbol
Throws:
java.io.IOException

mapGet

public XML mapGet(boolean hyperlinks)
           throws java.io.IOException,
                  java.lang.IllegalArgumentException
Returns the list of fields and their location in MAPPED data for the current view

Specified by:
mapGet in class Conversation
Parameters:
hyperlinks - true if hyperlink definitions are to be returned for each field.
Returns:
An XML structue of a "map" element with multiple "element" sub-elements. A "map" element has the following attributes:
  • gdc
  • row-length
  • view
  • form
An "element" has the following attributes:
  • id
  • data-type
  • display-mode
  • summary-type
  • name
  • visible
  • width
  • offset
  • threshold-offset
An "element" has the following sub-elements:
  • hdr1
  • hdr2
  • count-if
  • hyperlink
Throws:
java.io.IOException
java.lang.IllegalArgumentException - if hyperlinks are requested, but the host is at a maintenance level that does not support this function.
See Also:
Hyperlink, Conversation.dataGet(int), Conversation.MAPPED

close

public void close()
Description copied from class: Conversation
Terminates the conversation

Overrides:
close in class Conversation

send

public XML send(XML req)

getHost

public HostServer getHost()
Specified by:
getHost in class Conversation

dictionarySet

public void dictionarySet(java.lang.String symbol,
                          java.lang.String value)
                   throws java.io.IOException
Sets a dictionary symbol in the host.

Specified by:
dictionarySet in class Conversation
Throws:
java.io.IOException

streamSend

public void streamSend(java.lang.String name,
                       java.lang.String stream)
                throws java.io.IOException,
                       java.lang.IllegalArgumentException
Send a data stream to the back end.

Specified by:
streamSend in class Conversation
Parameters:
name - Up to 14 character stream name
stream - Arbitrary data stream
Throws:
java.lang.IllegalArgumentException - if name is longer than 14 characters.
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object