Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.comm
Class CheckHostCallback

java.lang.Object
  extended by Job
      extended by com.ibm.etools.iseries.subsystems.qsys.comm.CheckHostCallback

public class CheckHostCallback
extends Job

API class for testing if host callbacks can be done.

Since:
RWDi 6.0

Field Summary
static byte RC_CLIENTCONN_ERR
           
static byte RC_CLIENTCONN_ERROR
           
static byte RC_CLIENTCONN_FAILED
           
static byte RC_CLIENTCONN_INVALID_HOSTNAME
           
static byte RC_CLIENTCONN_OK
           
static byte RC_CLIENTCONN_TIMEOUT
           
 
Constructor Summary
CheckHostCallback(AS400 as400)
          Constructor
 
Method Summary
 int checkHostCallback(int port, int timeout)
          Test if a socket connection can be created from the iSeries back to the client.
 int checkHostCallback(String clientHostname, int port, int timeout)
          Test if a socket connection can be created from the iSeries back to the client
 SystemMessageException getException()
          For use when scheduled as a Job.
 String getHostname()
          For use when scheduled as a Job.
 int getPort()
          For use when scheduled as a Job.
 int getReturnCode()
          For use when scheduled as a Job.
 int getTimeout()
          For use when scheduled as a Job.
 boolean isDone()
          For use when scheduled as a Job.
 void reset()
          For use when scheduled as a Job.
protected  IStatus run(IProgressMonitor monitor)
          run method for using the CheckHostCallback as a separate runnable Job.
 void setException(SystemMessageException exception)
          For use when scheduled as a Job.
 void setHostname(String hostname)
          For use when scheduled as a Job.
 void setPort(int port)
          For use when scheduled as a Job.
 void setReturnCode(int returnCode)
          For use when scheduled as a Job.
 void setTimeout(int timeout)
          For use when scheduled as a Job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RC_CLIENTCONN_ERROR

public static final byte RC_CLIENTCONN_ERROR
See Also:
Constant Field Values

RC_CLIENTCONN_OK

public static final byte RC_CLIENTCONN_OK
See Also:
Constant Field Values

RC_CLIENTCONN_FAILED

public static final byte RC_CLIENTCONN_FAILED
See Also:
Constant Field Values

RC_CLIENTCONN_TIMEOUT

public static final byte RC_CLIENTCONN_TIMEOUT
See Also:
Constant Field Values

RC_CLIENTCONN_INVALID_HOSTNAME

public static final byte RC_CLIENTCONN_INVALID_HOSTNAME
See Also:
Constant Field Values

RC_CLIENTCONN_ERR

public static final byte RC_CLIENTCONN_ERR
See Also:
Constant Field Values
Constructor Detail

CheckHostCallback

public CheckHostCallback(AS400 as400)
Constructor

Parameters:
as400 - Toolbox object used to perform host program call (the host program in turn tries the callback)
Method Detail

checkHostCallback

public int checkHostCallback(String clientHostname,
                             int port,
                             int timeout)
                      throws SystemMessageException
Test if a socket connection can be created from the iSeries back to the client

Parameters:
clientHostname - TCP/IP hostname or address of the client
port - TCP/IP port to connect back to
timeout - seconds to wait for socket to connect
Throws:
SystemMessageException
Since:
RWDi 6.0

checkHostCallback

public int checkHostCallback(int port,
                             int timeout)
                      throws SystemMessageException
Test if a socket connection can be created from the iSeries back to the client. This method uses the hostname for the client when testing the callback.

Parameters:
port - TCP/IP port to connect back to
timeout - seconds to wait for socket to connect
Throws:
SystemMessageException
Since:
RWDi 6.0

run

protected IStatus run(IProgressMonitor monitor)
run method for using the CheckHostCallback as a separate runnable Job. If you don't need this function then you can invoke the checkHostCallback method directly.


getException

public SystemMessageException getException()
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


setException

public void setException(SystemMessageException exception)
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


getHostname

public String getHostname()
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


setHostname

public void setHostname(String hostname)
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


getPort

public int getPort()
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


setPort

public void setPort(int port)
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


getReturnCode

public int getReturnCode()
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


setReturnCode

public void setReturnCode(int returnCode)
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


getTimeout

public int getTimeout()
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


setTimeout

public void setTimeout(int timeout)
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


isDone

public boolean isDone()
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly.


reset

public void reset()
For use when scheduled as a Job. Not used if either of the checkHostCallback methods are invoked directly. Resets the isDone flag so Job can be rescheduled.


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.