dsnserver
Class XmlRpcTargetCommand_CmdID

java.lang.Object
  extended by java.lang.Thread
      extended by dsnserver.XmlRpcTargetCommand_CmdID
All Implemented Interfaces:
java.lang.Runnable

public class XmlRpcTargetCommand_CmdID
extends java.lang.Thread

NOT USED YET! A function which is used as a XmlRpc function. It is used for sending out a target command and to send the reply back to the GUI.

Author:
kaltt

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  Communication myComm
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
XmlRpcTargetCommand_CmdID(Communication comm)
           
 
Method Summary
 java.util.Vector targetCommand(java.lang.String DSNID, java.lang.String command, long timeout)
          This function is not waiting for a maxrepy amount.
 java.util.Vector targetCommand(java.lang.String DSNID, java.lang.String command, long timeout, int maxreply)
          A function which is used as a XmlRpc function.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myComm

Communication myComm
Constructor Detail

XmlRpcTargetCommand_CmdID

public XmlRpcTargetCommand_CmdID(Communication comm)
Method Detail

targetCommand

public java.util.Vector targetCommand(java.lang.String DSNID,
                                      java.lang.String command,
                                      long timeout,
                                      int maxreply)
                               throws java.lang.Exception
A function which is used as a XmlRpc function. It is used for sending out a target command and to send the reply back to the GUI. The replies are stored in a DB table, this will be done from the class CmdParserTargetCommand. It regularly it looks if the timeout is over or if the number of stored replies in the DB is equal or grater than maxreply. In this case the replies will be sent back.

Parameters:
String - DSNID
String command (the command that will be sent to the Target)
long timeout (the time we will wait before sending back the replies)
int maxreply (the number of replies we are waiting for)
Returns:
Vector targetCommand (Hashtable: Key: (DSNID, cmdReply))
Throws:
java.lang.Exception

targetCommand

public java.util.Vector targetCommand(java.lang.String DSNID,
                                      java.lang.String command,
                                      long timeout)
                               throws java.lang.Exception
This function is not waiting for a maxrepy amount. The result is sent back after the timeout. ( result = targetCommand(DSNID, command, timeout, 0); return result;)

Parameters:
String - DSNID
String command (the command that will be sent to the Target)
long timeout (the time we will wait before sending back the replies)
Returns:
Vector targetCommand (Hashtable: Key: (DSNID, cmdReply))
Throws:
java.lang.Exception