|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rcCommand.rcCmd
rcCmd sends a command to the PHENIX RunControl server. The class is implemented following the command design pattern. That means that rcCmd the abstract supertype for all rcCmds that send the actual commands to the CORBA run control server. The class is designed such that after the first time an command was sent to the run control, it "remembers" which run control received the event. So if we keep talking to the same run control, it will remember the CORBA connection and no time is lost with setting up the communication channel to the server.
Field Summary | |
private static boolean |
bConnected
|
protected static boolean |
bDebug
|
private IE.Iona.OrbixWeb.CORBA.ORB |
itOrbRef
|
protected static rcCommand.nameserv |
refNameServer
|
private static java.lang.String |
sNameServer
|
private static java.lang.String |
sNameServerHost
|
protected static java.lang.String |
sPartitionId
|
private static java.lang.String |
sPartitionNamePrefix
|
private static java.lang.String |
sRunControlNamePrefix
|
protected static rcCommand.Objmgr |
theObjmgr
|
protected static rcCommand.Partition |
thePartition
|
Constructor Summary | |
rcCmd()
Constructor of parent rcCmd. |
Method Summary | |
static rcCmd |
createCmd(java.lang.String theArg)
Creates a command with one String as argument. |
static rcCmd |
createCmd(java.lang.String[] argv)
Creates a run control command. |
static rcCmd |
createCmd(java.lang.String arg1,
java.lang.String arg2)
Creates a command with two strings as argument. |
abstract int |
execute()
Executes the command (i.e. |
java.lang.String |
execute(java.lang.String strOfWhat,
rcStringHolder names,
rcStringHolder values)
An execute function that takes a string as argument and returns a set of strings as return values. |
static java.lang.String |
getPartitionId()
Returns the identifier of the partition we are currently talking to. |
boolean |
isConnected()
Returns true if there is a valid connection to a run control server |
static boolean |
isServerRunning(int nMaxWaitSec)
Returns true if the server is running. |
static void |
main(java.lang.String[] argv)
Main that allows to execute individual commands from the shell |
private static void |
printHelp()
Prints a list of supported commands to System.out. |
static void |
selectPartition(java.lang.String thePartitionId)
Selects the partition by its identifier. |
void |
setDebug(boolean bDebug)
Turns on/off the debug flag, which allows to dump into to System.out |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final java.lang.String sNameServer
private static final java.lang.String sNameServerHost
private static final java.lang.String sRunControlNamePrefix
private static final java.lang.String sPartitionNamePrefix
protected static java.lang.String sPartitionId
protected static rcCommand.nameserv refNameServer
protected static rcCommand.Objmgr theObjmgr
protected static rcCommand.Partition thePartition
private IE.Iona.OrbixWeb.CORBA.ORB itOrbRef
protected static boolean bDebug
private static boolean bConnected
Constructor Detail |
public rcCmd()
Note that the current implementation only talks to one run control server. This can be expanded in the future.
Method Detail |
public void setDebug(boolean bDebug)
public boolean isConnected()
public static void selectPartition(java.lang.String thePartitionId)
public static java.lang.String getPartitionId()
public abstract int execute()
public java.lang.String execute(java.lang.String strOfWhat, rcStringHolder names, rcStringHolder values)
public static rcCmd createCmd(java.lang.String[] argv)
public static rcCmd createCmd(java.lang.String theArg)
public static rcCmd createCmd(java.lang.String arg1, java.lang.String arg2)
private static void printHelp()
public static boolean isServerRunning(int nMaxWaitSec)
nMaxWaitSec
- maximum number of seconds to wait if the server
is not runningpublic static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |