|
Remote System Explorer DataStore Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjava.lang.Thread
org.eclipse.dstore.core.model.Handler
org.eclipse.dstore.core.model.CommandHandler
org.eclipse.dstore.core.client.ClientCommandHandler
The ClientCommandHandler is reponsible for maintaining a queue of commands and periodically sending commands from the queue to the server side.
| Field Summary | |
|---|---|
protected DataElement |
_classDocumentElement
|
protected DataElement |
_confirmKeepAliveDocumentElement
|
protected DataElement |
_docDocumentElement
|
protected DataElement |
_fileDocumentElement
|
protected DataElement |
_keepAliveDocumentElement
|
protected DataElement |
_pendingKeepAliveConfirmation
|
protected DataElement |
_pendingKeepAliveRequest
|
protected DataElement |
_requestClassDocumentElement
|
protected DataElement |
_serializedDocumentElement
|
| Fields inherited from class org.eclipse.dstore.core.model.CommandHandler |
|---|
_classesToSend, _commands |
| Fields inherited from class org.eclipse.dstore.core.model.Handler |
|---|
_dataStore, _keepRunning, _waitIncrement |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ClientCommandHandler(Sender sender)
Constructor |
|
| Method Summary | |
|---|---|
void |
addClassToSend(DataElement classElement)
Adds a class to the queue of classes (represented by DataElements) to be sent to the server. |
void |
handle()
Periodically called to send commands from the queue. |
void |
requestClass(String className)
Implemented to provide the means by which classes are requested across the comm channel. |
void |
sendAppendFile(String fileName,
byte[] bytes,
int size,
boolean binary)
Appends bytes of a file from the client to the server |
void |
sendAppendFile(String fileName,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Appends bytes of a file from the client to the server |
void |
sendClass(String className)
Implemented to provide the means by which classes are requested and sent across the comm channel. |
void |
sendClass(String className,
String classbyteStreamHandlerId)
Implemented to provide the means by which classes are sent across the comm channel. |
void |
sendClassInstance(IRemoteClassInstance runnable,
String deserializebyteStreamHandlerId)
Runs the specified class on the remote system |
void |
sendCommands()
Called periodically to send the current queue of commands to the server |
void |
sendFile(String fileName,
byte[] bytes,
int size,
boolean binary)
Transmits the bytes of a file from the client to the server |
void |
sendFile(String fileName,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Transmits the bytes of a file from the client to the server |
void |
sendKeepAliveConfirmation()
|
void |
sendKeepAliveRequest()
|
void |
setDataStore(DataStore dataStore)
Sets the associated DataStore |
void |
waitForInput()
Causes the current thread to wait until this class request has been fulfilled. |
| Methods inherited from class org.eclipse.dstore.core.model.CommandHandler |
|---|
addCommand, cancelAllCommands, command, command, command, command, command, getCommandGenerator, getDataStore |
| Methods inherited from class org.eclipse.dstore.core.model.Handler |
|---|
finish, getWaitTime, isFinished, notifyInput, 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 |
protected DataElement _requestClassDocumentElement
protected DataElement _keepAliveDocumentElement
protected DataElement _confirmKeepAliveDocumentElement
protected DataElement _pendingKeepAliveRequest
protected DataElement _pendingKeepAliveConfirmation
protected DataElement _fileDocumentElement
protected DataElement _docDocumentElement
protected DataElement _classDocumentElement
protected DataElement _serializedDocumentElement
| Constructor Detail |
public ClientCommandHandler(Sender sender)
sender - the Sender| Method Detail |
public void setDataStore(DataStore dataStore)
CommandHandler
setDataStore in class CommandHandler
public void sendFile(String fileName,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
sendFile in class CommandHandlerbytes - the bytes of a file to sendsize - the number of bytes to sendbinary - indicates whether to send the bytes as binary or unicodebyteStreamHandlerId - indicates wwhich byte stream handler should receive the bytesfileName - the name of the file to send
public void sendFile(String fileName,
byte[] bytes,
int size,
boolean binary)
sendFile in class CommandHandlerbytes - the bytes of a file to sendsize - the number of bytes to sendbinary - indicates whether to send the bytes as binary or unicodefileName - the name of the file to send
public void sendAppendFile(String fileName,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
sendAppendFile in class CommandHandlerbytes - the bytes of a file to sendsize - the number of bytes to sendbinary - indicates whether to send the bytes as binary or unicodebyteStreamHandlerId - indicates which byte stream handler should receive the bytesfileName - the name of the file to send
public void sendAppendFile(String fileName,
byte[] bytes,
int size,
boolean binary)
sendAppendFile in class CommandHandlerbytes - the bytes of a file to sendsize - the number of bytes to sendbinary - indicates whether to send the bytes as binary or unicodefileName - the name of the file to sendpublic void sendCommands()
sendCommands in class CommandHandlerpublic void handle()
CommandHandler
handle in class CommandHandler
public void sendClass(String className,
String classbyteStreamHandlerId)
sendClass in class CommandHandlerclassName - the name of the class to sendclassbyteStreamHandlerId - the name of the byte stream handler to use to receive the classpublic void sendClass(String className)
sendClass in class CommandHandlerclassName - the name of the class to sendpublic void addClassToSend(DataElement classElement)
classElement - the DataElement representing the class to be sent
public void sendClassInstance(IRemoteClassInstance runnable,
String deserializebyteStreamHandlerId)
CommandHandler
sendClassInstance in class CommandHandlerpublic void requestClass(String className)
requestClass in class CommandHandlerclassName - the name of the class to requestpublic void sendKeepAliveConfirmation()
sendKeepAliveConfirmation in class CommandHandlerpublic void sendKeepAliveRequest()
sendKeepAliveRequest in class CommandHandlerpublic void waitForInput()
CommandHandler
waitForInput in class CommandHandler
|
Remote System Explorer DataStore Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||