Rational Developer for i
7.5.0

com.ibm.etools.systems.as400.debug.sep.internal
Class PhantomDebugTarget

java.lang.Object
  extended by com.ibm.etools.systems.as400.debug.sep.internal.PhantomDebugTarget
All Implemented Interfaces:
ISystemCommunicationsDaemonHandler, ISystemCommunicationsDaemonListener, PhantomEngineStatusListener

public class PhantomDebugTarget
extends Object
implements ISystemCommunicationsDaemonHandler, ISystemCommunicationsDaemonListener, PhantomEngineStatusListener


Field Summary
static String copyright
           
 
Fields inherited from interface com.ibm.etools.iseries.subsystems.qsys.comm.ISystemCommunicationsDaemonListener
Copyright
 
Fields inherited from interface com.ibm.etools.systems.as400.debug.sep.internal.PhantomEngineStatusListener
COMM_LOST, START_FAIL
 
Constructor Summary
PhantomDebugTarget(IBMiConnection iSeriesConnection)
          Constructor.
 
Method Summary
 void addListener(PhantomEngineStatusListener listener)
          Add a listener
 void daemonStateChanged(SystemCommunicationsDaemonEvent event)
          This method is invoked whenever the state of the SystemCommunicationsDaemon changes.
 boolean enableServiceEntryPoint(int breakpointID, boolean enablement)
          Construct and process enable/disable ServiceEntryPoint request.
 String getCurrentMessage()
           
 AS400 getUserJobToolboxObject()
          Get toolbox object for user job
 void handleRequest(Socket connectedSocket, int rseDaemonKey)
          Handle notifications from the phantom debug engine.
 boolean ifAttachFailed()
           
 int modifyServiceEntryPoint(int breakpointID, String selectedUserID, String selectedProgramDestination, String selectedProgramType, String selectedProgramName, String selectedModuleName, String selectedEntryName, boolean enginePreference)
          Construct and process modify ServiceEntryPoint request.
 void phantomDebugTargetJobStatusChanged(int status, String hostName, String userProfile)
          Process teh phantom debug target job change event.
 boolean refreshServiceEntryPoint(String selectedProgramDestination, String selectedProgramName, String selectedProgramType, List<Integer> invalidSEPIDs)
           
 void removeListener(PhantomEngineStatusListener listener)
          Remove a listener
 boolean removeServiceEntryPoint(int breakpointID)
          Construct and process remove ServiceEntryPoint request.
 int setServiceEntryPoint(String selectedUserID, String selectedProgramDestination, String selectedProgramType, String selectedProgramName, String selectedModuleName, String selectedEntryName, boolean enginePreference)
          Construct and process set ServiceEntryPoint request At this point front-end already did a check for conflicts.
 boolean start()
          Create a phantom user job, then start
 boolean terminate()
          Terminate the phantom debug engine
 void waitForAttachCompleted(int loop)
          Wait till the phantom engine attaches to phantom user job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

PhantomDebugTarget

public PhantomDebugTarget(IBMiConnection iSeriesConnection)
Constructor.

Method Detail

start

public boolean start()
Create a phantom user job, then start


setServiceEntryPoint

public int setServiceEntryPoint(String selectedUserID,
                                String selectedProgramDestination,
                                String selectedProgramType,
                                String selectedProgramName,
                                String selectedModuleName,
                                String selectedEntryName,
                                boolean enginePreference)
Construct and process set ServiceEntryPoint request At this point front-end already did a check for conflicts.


modifyServiceEntryPoint

public int modifyServiceEntryPoint(int breakpointID,
                                   String selectedUserID,
                                   String selectedProgramDestination,
                                   String selectedProgramType,
                                   String selectedProgramName,
                                   String selectedModuleName,
                                   String selectedEntryName,
                                   boolean enginePreference)
Construct and process modify ServiceEntryPoint request. At this point front-end already checked for SEP existence


removeServiceEntryPoint

public boolean removeServiceEntryPoint(int breakpointID)
Construct and process remove ServiceEntryPoint request. At this point front-end already checked for SEP existence


enableServiceEntryPoint

public boolean enableServiceEntryPoint(int breakpointID,
                                       boolean enablement)
Construct and process enable/disable ServiceEntryPoint request. At this point front-end already checked for SEP existence


terminate

public boolean terminate()
Terminate the phantom debug engine


handleRequest

public void handleRequest(Socket connectedSocket,
                          int rseDaemonKey)
Handle notifications from the phantom debug engine. Functions are identified by their integer key. Multiple function calls are allowed on the same socket, this function continues recieving and forwarding (to CODECommFunctions) functions until an RSE_CLOSE_SOCKET function call is recieved. Once the RSE_CLOSE_SOCKET function is recieved the socket is closed without sending anything back to the remote peer.

Specified by:
handleRequest in interface ISystemCommunicationsDaemonHandler
Parameters:
connectedSocket - The communications socket connected to the remote peer. The only thing read of the socket will have been the request key.
See Also:
com.ibm.etools.iseries.core.comm.ICommunicationsDaemonHandler#handleRequest(Socket)

daemonStateChanged

public void daemonStateChanged(SystemCommunicationsDaemonEvent event)
This method is invoked whenever the state of the SystemCommunicationsDaemon changes. For example if the daemon is started, stopped or ends in error.

Specified by:
daemonStateChanged in interface ISystemCommunicationsDaemonListener
See Also:
#daemonStateChanged(SystemCommunicationsDaemonEvent)

getCurrentMessage

public String getCurrentMessage()

waitForAttachCompleted

public void waitForAttachCompleted(int loop)
Wait till the phantom engine attaches to phantom user job. But it is not an infinite wait. call could decide how many cycle it wants to wait.


getUserJobToolboxObject

public AS400 getUserJobToolboxObject()
Get toolbox object for user job

Returns:

addListener

public void addListener(PhantomEngineStatusListener listener)
Add a listener


removeListener

public void removeListener(PhantomEngineStatusListener listener)
Remove a listener


phantomDebugTargetJobStatusChanged

public void phantomDebugTargetJobStatusChanged(int status,
                                               String hostName,
                                               String userProfile)
Process teh phantom debug target job change event. Defined by PhantomEngineJobListener. Currently just reroute the received events to its listener to support event chains.

Specified by:
phantomDebugTargetJobStatusChanged in interface PhantomEngineStatusListener
Parameters:
status -

refreshServiceEntryPoint

public boolean refreshServiceEntryPoint(String selectedProgramDestination,
                                        String selectedProgramName,
                                        String selectedProgramType,
                                        List<Integer> invalidSEPIDs)
Parameters:
string -
Returns:

ifAttachFailed

public boolean ifAttachFailed()

Rational Developer for i
7.5.0

Copyright 2009 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.