com.bmc.mainview.nvbapi
Class LiveServer

java.lang.Object
  extended by com.bmc.mainview.nvbapi.HostServer
      extended by com.bmc.mainview.nvbapi.LiveServer

public class LiveServer
extends HostServer

Creates a session with an MVI-3 Host Server

Version:
2.0
Author:
F. Schneider

Field Summary
 
Fields inherited from class com.bmc.mainview.nvbapi.HostServer
connectTime, HOSTFORMAT, timeDelta, VERSION
 
Constructor Summary
LiveServer(java.lang.Object logger, java.lang.String hostName, java.lang.String hostAddress, int hostPort, java.lang.String user, java.lang.String pass, ConversationListener capture)
          Creates a session with the mainframe
LiveServer(java.lang.Object logger, java.lang.String hostName, java.lang.String hostAddress, int hostPort, java.lang.String user, java.lang.String pass, java.lang.String newPassword, ConversationListener capture)
           
 
Method Summary
 XML connect()
          Uses the current settings to create a session with the host server.
 Conversation conversationFactory()
          Creates a new conversation using this host session
 Conversation conversationFactory(java.lang.String monitorID)
          Creates a new conversation using this host session
 void disconnect()
          Ends the session
 void refreshSession()
          If the host server is restarted, our session ID can become invalid.
 void sendKeepAlive()
           
 
Methods inherited from class com.bmc.mainview.nvbapi.HostServer
getAddr, getCanonicalHostName, getHostLvl, getName, getPassword, getPort, getTimeout, getUserID, isConnected, isFunctional, loadTargets, loadTargets, setName, setNewPassword, setPassword, setTimeout, setUserID, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LiveServer

public LiveServer(java.lang.Object logger,
                  java.lang.String hostName,
                  java.lang.String hostAddress,
                  int hostPort,
                  java.lang.String user,
                  java.lang.String pass,
                  ConversationListener capture)
Creates a session with the mainframe

Parameters:
logger - A logger to receive trace information for debugging. It may be either a SLF4J Logger or a JDK1.4 Logger.
hostName - The name which is used to refer to this particular session in log entries
hostAddress - The IP address of the mainframe.
hostPort - The port number on which the MVI Host Server is running
user - A z/OS user ID
pass - The corresponding password
capture - A ConversationListener to be added to all conversaions

LiveServer

public LiveServer(java.lang.Object logger,
                  java.lang.String hostName,
                  java.lang.String hostAddress,
                  int hostPort,
                  java.lang.String user,
                  java.lang.String pass,
                  java.lang.String newPassword,
                  ConversationListener capture)
Method Detail

connect

public XML connect()
            throws java.io.IOException
Uses the current settings to create a session with the host server.

Specified by:
connect in class HostServer
Returns:
an XML structure of a "control-resp" element which has the following attributes:
  • newid=”xxxxxxxxxxxxxxxx” - an ID that is a 16-byte printable hex character representation of an 8-byte “encryption” key
  • version=”v.r.mm”
  • sysname=”hostname”
Throws:
java.io.IOException
See Also:
HostServer.disconnect()

refreshSession

public void refreshSession()
                    throws java.io.IOException
If the host server is restarted, our session ID can become invalid. This method reconnects to the server.

Throws:
java.io.IOException

conversationFactory

public Conversation conversationFactory()
                                 throws java.io.IOException
Creates a new conversation using this host session

Specified by:
conversationFactory in class HostServer
Returns:
A Conversation object
Throws:
java.io.IOException
See Also:
disconnect()

conversationFactory

public Conversation conversationFactory(java.lang.String monitorID)
                                 throws java.io.IOException
Description copied from class: HostServer
Creates a new conversation using this host session

Specified by:
conversationFactory in class HostServer
Parameters:
monitorID - the related monitor ID
Returns:
A conversation object
Throws:
java.io.IOException

disconnect

public void disconnect()
Ends the session

Specified by:
disconnect in class HostServer

sendKeepAlive

public void sendKeepAlive()