Remote Systems
v6.4.1

com.ibm.etools.systems.dstore.core.client
Class ClientCommandHandler

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.ibm.etools.systems.dstore.core.model.Handler
          extended bycom.ibm.etools.systems.dstore.core.model.CommandHandler
              extended bycom.ibm.etools.systems.dstore.core.client.ClientCommandHandler
All Implemented Interfaces:
Runnable

public class ClientCommandHandler
extends CommandHandler

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 _confirmKeepAliveDocumentElement
           
protected  DataElement _keepAliveDocumentElement
           
protected  DataElement _pendingKeepAliveConfirmation
           
protected  DataElement _pendingKeepAliveRequest
           
static String Copyright
           
 
Fields inherited from class com.ibm.etools.systems.dstore.core.model.CommandHandler
_commands
 
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
ClientCommandHandler(Sender sender)
          Constructor
 
Method Summary
 void handle()
          Periodically called to send commands from the queue.
 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 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 bytesStreamHandlerId)
          Transmits the bytes of a file from the client to the server
 void sendKeepAliveConfirmation()
           
 void sendKeepAliveRequest()
           
 void setDataStore(DataStore dataStore)
          Sets the associated DataStore
 
Methods inherited from class com.ibm.etools.systems.dstore.core.model.CommandHandler
addCommand, cancelAllCommands, command, command, command, command, command, getDataStore
 
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

Copyright

public static final String Copyright
See Also:
Constant Field Values

_keepAliveDocumentElement

protected DataElement _keepAliveDocumentElement

_confirmKeepAliveDocumentElement

protected DataElement _confirmKeepAliveDocumentElement

_pendingKeepAliveRequest

protected DataElement _pendingKeepAliveRequest

_pendingKeepAliveConfirmation

protected DataElement _pendingKeepAliveConfirmation
Constructor Detail

ClientCommandHandler

public ClientCommandHandler(Sender sender)
Constructor

Parameters:
sender - the Sender
Method Detail

setDataStore

public void setDataStore(DataStore dataStore)
Description copied from class: CommandHandler
Sets the associated DataStore

Overrides:
setDataStore in class CommandHandler

sendFile

public void sendFile(String fileName,
                     byte[] bytes,
                     int size,
                     boolean binary,
                     String bytesStreamHandlerId)
Transmits the bytes of a file from the client to the server

Specified by:
sendFile in class CommandHandler
Parameters:
bytes - the bytes of a file to send
size - the number of bytes to send
binary - indicates whether to send the bytes as binary or unicode
bytesStreamHandlerId - indicates wwhich byte stream handler should receive the bytes
fileName - the name of the file to send

sendFile

public void sendFile(String fileName,
                     byte[] bytes,
                     int size,
                     boolean binary)
Transmits the bytes of a file from the client to the server

Specified by:
sendFile in class CommandHandler
Parameters:
bytes - the bytes of a file to send
size - the number of bytes to send
binary - indicates whether to send the bytes as binary or unicode
fileName - the name of the file to send

sendAppendFile

public void sendAppendFile(String fileName,
                           byte[] bytes,
                           int size,
                           boolean binary,
                           String byteStreamHandlerId)
Appends bytes of a file from the client to the server

Specified by:
sendAppendFile in class CommandHandler
Parameters:
bytes - the bytes of a file to send
size - the number of bytes to send
binary - indicates whether to send the bytes as binary or unicode
byteStreamHandlerId - indicates which byte stream handler should receive the bytes
fileName - the name of the file to send

sendAppendFile

public void sendAppendFile(String fileName,
                           byte[] bytes,
                           int size,
                           boolean binary)
Appends bytes of a file from the client to the server

Specified by:
sendAppendFile in class CommandHandler
Parameters:
bytes - the bytes of a file to send
size - the number of bytes to send
binary - indicates whether to send the bytes as binary or unicode
fileName - the name of the file to send

sendCommands

public void sendCommands()
Called periodically to send the current queue of commands to the server

Specified by:
sendCommands in class CommandHandler

handle

public void handle()
Description copied from class: CommandHandler
Periodically called to send commands from the queue.

Overrides:
handle in class CommandHandler

sendKeepAliveConfirmation

public void sendKeepAliveConfirmation()
Specified by:
sendKeepAliveConfirmation in class CommandHandler

sendKeepAliveRequest

public void sendKeepAliveRequest()
Specified by:
sendKeepAliveRequest in class CommandHandler

Remote Systems
v6.4.1

Copyright © 2005 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.