Remote Systems
v6.4.1

com.ibm.etools.systems.dstore.core.model
Class UpdateHandler

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.ibm.etools.systems.dstore.core.model.Handler
          extended bycom.ibm.etools.systems.dstore.core.model.UpdateHandler
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
ClientUpdateHandler, ServerUpdateHandler

public abstract class UpdateHandler
extends Handler

Abtract class for handling updates. A UpdateHandler is a Handler that contains a queue of data responses to be sent to the client. Each DataStore instance uses a single update handler that periodically sends it's data queue either to a client or directly to a domain listener on the client.

The UpdateHandler is the means by which the DataStore sends information or files from the remote tools to the client.


Field Summary
protected  ArrayList _dataObjects
           
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
UpdateHandler()
          Constructor
 
Method Summary
protected  void clean(DataElement object)
           
protected  void clean(DataElement object, int depth)
           
 void handle()
          Periodically called on the handler thread to sends data updates.
abstract  void sendKeepAliveConfirmation()
          Implemented to provide the means by which keepalive confirmations are sent across the comm channel.
abstract  void sendKeepAliveRequest()
          Implemented to provide the means by which keepalive requests are sent across the comm channel.
abstract  void sendUpdates()
          Implemented to provide the means by which updates on the queue are sent.
 void update(ArrayList objects)
          Adds a set of data objects to the update queue
 void update(DataElement object)
          Adds an object to the update queue
 void update(DataElement object, boolean immediate)
          Adds an object to the update queue
abstract  void updateAppendFile(String path, byte[] bytes, int size, boolean binary)
          Implemented to provide the means by which files are sent and appended
abstract  void updateAppendFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
          Implemented to provide the means by which files are sent and appended
abstract  void updateFile(String path, byte[] bytes, int size, boolean binary)
          Implemented to provide the means by which files are sent
abstract  void updateFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
          Implemented to provide the means by which files are sent
 
Methods inherited from class com.ibm.etools.systems.dstore.core.model.Handler
finish, getWaitTime, isFinished, run, setDataStore, 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

_dataObjects

protected ArrayList _dataObjects
Constructor Detail

UpdateHandler

public UpdateHandler()
Constructor

Method Detail

handle

public void handle()
Periodically called on the handler thread to sends data updates.

Specified by:
handle in class Handler

clean

protected void clean(DataElement object)

clean

protected void clean(DataElement object,
                     int depth)

update

public void update(ArrayList objects)
Adds a set of data objects to the update queue

Parameters:
objects - a set of objects to get updated

update

public void update(DataElement object)
Adds an object to the update queue

Parameters:
object - an object to get updated

update

public void update(DataElement object,
                   boolean immediate)
Adds an object to the update queue

Parameters:
object - an object to get updated
immediate - true indicates that this object should be first in the queue

sendUpdates

public abstract void sendUpdates()
Implemented to provide the means by which updates on the queue are sent.


updateFile

public abstract void updateFile(String path,
                                byte[] bytes,
                                int size,
                                boolean binary)
Implemented to provide the means by which files are sent

Parameters:
path - the path of the file to send
bytes - the bytes to send
size - the number of bytes to send
binary - indicates whether to send the bytes as binary or text

updateAppendFile

public abstract void updateAppendFile(String path,
                                      byte[] bytes,
                                      int size,
                                      boolean binary)
Implemented to provide the means by which files are sent and appended

Parameters:
path - the path of the file to send
bytes - the bytes to send
size - the number of bytes to send
binary - indicates whether to send the bytes as binary or text

updateFile

public abstract void updateFile(String path,
                                byte[] bytes,
                                int size,
                                boolean binary,
                                String byteStreamHandlerId)
Implemented to provide the means by which files are sent

Parameters:
path - the path of the file to send
bytes - the bytes to send
size - the number of bytes to send
binary - indicates whether to send the bytes as binary or text
byteStreamHandlerId - indicates the byte stream handler to receive the bytes

updateAppendFile

public abstract void updateAppendFile(String path,
                                      byte[] bytes,
                                      int size,
                                      boolean binary,
                                      String byteStreamHandlerId)
Implemented to provide the means by which files are sent and appended

Parameters:
path - the path of the file to send
bytes - the bytes to send
size - the number of bytes to send
binary - indicates whether to send the bytes as binary or text
byteStreamHandlerId - indicates the byte stream handler to receive the bytes

sendKeepAliveRequest

public abstract void sendKeepAliveRequest()
Implemented to provide the means by which keepalive requests are sent across the comm channel.


sendKeepAliveConfirmation

public abstract void sendKeepAliveConfirmation()
Implemented to provide the means by which keepalive confirmations are sent across the comm channel.


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.