|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.ibm.etools.systems.dstore.core.model.Handler
com.ibm.etools.systems.dstore.core.model.CommandHandler
Abtract class for handling commands. A CommandHandler
is a Handler
that
contains a queue of commands to be sent to miners. Each DataStore instance uses a single
command handler that periodically sends it's queue either to a server or directly
to miners.
The CommandHandler is the means by which the DataStore sends information or files from the client to the remote tools.
Field Summary | |
---|---|
protected ArrayList |
_commands
|
static String |
Copyright
|
Fields inherited from class com.ibm.etools.systems.dstore.core.model.Handler |
---|
_dataStore, _waitIncrement |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
CommandHandler()
Constructor |
Method Summary | |
---|---|
void |
addCommand(DataElement command,
boolean immediate)
Adds a command object to the queue |
void |
cancelAllCommands()
Removes and affectively cancels all commands from the current queue of commands |
DataElement |
command(DataElement cmd)
Add a command object to the command queue |
DataElement |
command(DataElement commandDescriptor,
ArrayList arguments,
DataElement object,
boolean refArg,
boolean immediate)
Create and add a new command object to the command queue. |
DataElement |
command(DataElement cmd,
boolean immediate)
Add a command object to the command queue |
DataElement |
command(DataElement commandDescriptor,
DataElement object,
boolean refArg)
Create and add a new command object to the command queue. |
DataElement |
command(DataElement commandDescriptor,
DataElement arg,
DataElement object,
boolean refArg,
boolean immediate)
Create and add a new command object to the command queue. |
DataStore |
getDataStore()
Returns the associated DataStore |
void |
handle()
Periodically called to send commands from the queue. |
abstract void |
sendAppendFile(String fileName,
byte[] bytes,
int size,
boolean binary)
Implemented to provide the means by which file bytes are sent and appended |
abstract void |
sendAppendFile(String fileName,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Implemented to provide the means by which file bytes are sent and appended |
abstract void |
sendCommands()
Implemented to provide the means by which commands in the queue are sent |
abstract void |
sendFile(String fileName,
byte[] bytes,
int size,
boolean binary)
Implemented to provide the means by which file bytes are sent |
abstract void |
sendFile(String fileName,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Implemented to provide the means by which file bytes are sent |
abstract void |
sendKeepAliveConfirmation()
|
abstract void |
sendKeepAliveRequest()
|
void |
setDataStore(DataStore dataStore)
Sets the associated DataStore |
Methods inherited from class com.ibm.etools.systems.dstore.core.model.Handler |
---|
finish, getWaitTime, isFinished, run, setWaitTime |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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 |
public static final String Copyright
protected ArrayList _commands
Constructor Detail |
public CommandHandler()
Method Detail |
public void setDataStore(DataStore dataStore)
setDataStore
in class Handler
dataStore
- public DataStore getDataStore()
public void addCommand(DataElement command, boolean immediate)
command
- the command to add to the queueimmediate
- indicates whether the command should be inserted first in the queue
or whether it should be appended.public void handle()
handle
in class Handler
public DataElement command(DataElement commandDescriptor, ArrayList arguments, DataElement object, boolean refArg, boolean immediate)
commandDescriptor
- the descriptor for the new commandarguments
- the arguments for the commandobject
- the subject of the commandrefArg
- indicates whether the subject should be represented in the command as a
reference to the subject or the actual subject, itselfimmediate
- indicates whether the command should be first in the queue or appended to it
public DataElement command(DataElement commandDescriptor, DataElement arg, DataElement object, boolean refArg, boolean immediate)
commandDescriptor
- the descriptor for the new commandarg
- the arg for the commandobject
- the subject of the commandrefArg
- indicates whether the subject should be represented in the command as a
reference to the subject or the actual subject, itselfimmediate
- indicates whether the command should be first in the queue or appended to it
public DataElement command(DataElement commandDescriptor, DataElement object, boolean refArg)
commandDescriptor
- the descriptor for the new commandobject
- the subject of the commandrefArg
- indicates whether the subject should be represented in the command as a
reference to the subject or the actual subject, itself
public DataElement command(DataElement cmd)
cmd
- the command object to add to the queue
public DataElement command(DataElement cmd, boolean immediate)
cmd
- the command object to add to the queueimmediate
- indicates whether the command is to be inserted first in the queue or appended
public void cancelAllCommands()
public abstract void sendCommands()
public abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary)
fileName
- the name of the file to sendbytes
- to bytes of the file to sendsize
- the number of bytes to sendbinary
- indicates whether to send the bytes as binary or textpublic abstract void sendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
fileName
- the name of the file to sendbytes
- to bytes of the file to sendsize
- the number of bytes to sendbinary
- indicates whether to send the bytes as binary or textbyteStreamHandlerId
- indicates which byte stream handler to receive the bytes withpublic abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary)
fileName
- the name of the file to sendbytes
- to bytes of the file to sendsize
- the number of bytes to sendbinary
- indicates whether to send the bytes as binary or textpublic abstract void sendAppendFile(String fileName, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
fileName
- the name of the file to sendbytes
- to bytes of the file to sendsize
- the number of bytes to sendbinary
- indicates whether to send the bytes as binary or textbyteStreamHandlerId
- indicates which byte stream handler to receive the bytes withpublic abstract void sendKeepAliveConfirmation()
public abstract void sendKeepAliveRequest()
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |