Remote System Explorer DataStore
Release 1.0

org.eclipse.dstore.core.client
Class ClientUpdateHandler

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.eclipse.dstore.core.model.Handler
          extended byorg.eclipse.dstore.core.model.UpdateHandler
              extended byorg.eclipse.dstore.core.client.ClientUpdateHandler
All Implemented Interfaces:
Runnable

public class ClientUpdateHandler
extends UpdateHandler

The ClientUpdateHandler is contains a queue of data update requests and periodically sends out domain notifications to domain listeners


Field Summary
 
Fields inherited from class org.eclipse.dstore.core.model.UpdateHandler
_classesToSend, _dataObjects
 
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
ClientUpdateHandler()
          Constructor
 
Method Summary
 void requestClass(String className)
          Implemented to provide the means by which classes are requested across the comm channel.
 void sendClass(String className)
          Does not apply in this case.
 void sendClass(String className, String classByteStreamHandlerId)
          Does not apply in this case.
 void sendKeepAliveConfirmation()
          Does not apply in this case.
 void sendKeepAliveRequest()
          Does not apply in this case.
 void sendUpdates()
          Periodically called to notify domain listeners of updated data from the server
 void updateAppendFile(String path, byte[] bytes, int size, boolean binary)
          Not applicable - this is only applicable on the server side
 void updateAppendFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
          Not applicable - this is only applicable on the server side
 void updateClassInstance(IRemoteClassInstance runnable, String deserializebyteStreamHandlerId)
          Impleted to provide the means by which a class on the host is updated on the client
 void updateFile(File file, DataElement object)
          Notifies domain listeners that a file has been updated
 void updateFile(String path, byte[] bytes, int size, boolean binary)
          Not applicable - this is only applicable on the server side
 void updateFile(String path, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
          Not applicable - this is only applicable on the server side
 
Methods inherited from class org.eclipse.dstore.core.model.UpdateHandler
clean, clean, handle, update, update, update, waitForInput
 
Methods inherited from class org.eclipse.dstore.core.model.Handler
finish, getWaitTime, isFinished, notifyInput, 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
 

Constructor Detail

ClientUpdateHandler

public ClientUpdateHandler()
Constructor

Method Detail

updateFile

public void updateFile(String path,
                       byte[] bytes,
                       int size,
                       boolean binary)
Not applicable - this is only applicable on the server side

Specified by:
updateFile in class UpdateHandler
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 void updateAppendFile(String path,
                             byte[] bytes,
                             int size,
                             boolean binary)
Not applicable - this is only applicable on the server side

Specified by:
updateAppendFile in class UpdateHandler
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 void updateFile(String path,
                       byte[] bytes,
                       int size,
                       boolean binary,
                       String byteStreamHandlerId)
Not applicable - this is only applicable on the server side

Specified by:
updateFile in class UpdateHandler
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 void updateAppendFile(String path,
                             byte[] bytes,
                             int size,
                             boolean binary,
                             String byteStreamHandlerId)
Not applicable - this is only applicable on the server side

Specified by:
updateAppendFile in class UpdateHandler
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

updateFile

public void updateFile(File file,
                       DataElement object)
Notifies domain listeners that a file has been updated

Parameters:
file - the updated file
object - the element associated with the updated file

sendUpdates

public void sendUpdates()
Periodically called to notify domain listeners of updated data from the server

Specified by:
sendUpdates in class UpdateHandler

requestClass

public void requestClass(String className)
Implemented to provide the means by which classes are requested across the comm channel. (Only applies to ServerUpdateHandler, so is a dummy method here)

Specified by:
requestClass in class UpdateHandler
Parameters:
className - the name of the class to request

updateClassInstance

public void updateClassInstance(IRemoteClassInstance runnable,
                                String deserializebyteStreamHandlerId)
Impleted to provide the means by which a class on the host is updated on the client

Specified by:
updateClassInstance in class UpdateHandler
Parameters:
runnable -
deserializebyteStreamHandlerId -

sendClass

public void sendClass(String className,
                      String classByteStreamHandlerId)
Does not apply in this case. Use ClientCommandHandler.sendClass().

Specified by:
sendClass in class UpdateHandler
Parameters:
className - the name of the class to send
classByteStreamHandlerId - indicates which class byte stream handler to receive the class with

sendClass

public void sendClass(String className)
Does not apply in this case. Use ClientCommandHandler.sendClass().

Specified by:
sendClass in class UpdateHandler
Parameters:
className - the name of the class to send

sendKeepAliveRequest

public void sendKeepAliveRequest()
Does not apply in this case. Use ClientCommandHandler.sendKeepAliveRequest().

Specified by:
sendKeepAliveRequest in class UpdateHandler

sendKeepAliveConfirmation

public void sendKeepAliveConfirmation()
Does not apply in this case. Use ClientCommandHandler.sendKeepAliveConfirmation().

Specified by:
sendKeepAliveConfirmation in class UpdateHandler

Remote System Explorer DataStore
Release 1.0

Guidelines for using DataStore APIs.