|
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.UpdateHandler
org.eclipse.dstore.core.server.ServerUpdateHandler
The ServerUpdateHandler is contains a queue of data update requests and periodically transmits it's queue to the client
| 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.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 | |
|---|---|
ServerUpdateHandler()
Constructor |
|
| Method Summary | |
|---|---|
void |
addClassToSend(DataElement classElement)
Adds a class to the queue of classes (represented by DataElements) to be sent to the client. |
void |
addSender(Sender sender)
Add a sender to the list of senders. |
void |
handle()
Periodically called on the handler thread to sends data updates. |
void |
removeSender(Sender sender)
Remove a sender from the list of senders. |
void |
removeSenderWith(Socket socket)
Removes the sender that is associated with the specified socket. |
void |
requestClass(String className)
Implemented to provide the means by which classes are sent across the comm channel. |
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 |
sendKeepAliveConfirmation()
Implemented to provide the means by which keepalive confirmations are sent across the comm channel. |
void |
sendKeepAliveRequest()
Implemented to provide the means by which keepalive requests are sent across the comm channel. |
void |
sendUpdates()
Periodically called to send data in the queue from the server to the client |
void |
setDataStore(DataStore dataStore)
Sets the associated DataStore |
void |
updateAppendFile(String path,
byte[] bytes,
int size,
boolean binary)
Appends bytes to the specified file on the client. |
void |
updateAppendFile(String path,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Appends bytes to the specified file on the client. |
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(String path,
byte[] bytes,
int size,
boolean binary)
Sends bytes to the specified file on the client. |
void |
updateFile(String path,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Sends bytes to the specified file on the client. |
void |
waitForInput()
Causes the current thread to wait until this class request has been fulfilled. |
| Methods inherited from class org.eclipse.dstore.core.model.UpdateHandler |
|---|
clean, clean, update, update, update |
| 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 _classDocumentElement
protected DataElement _keepAliveDocumentElement
protected DataElement _confirmKeepAliveDocumentElement
protected DataElement _pendingKeepAliveRequest
protected DataElement _pendingKeepAliveConfirmation
protected DataElement _fileDocumentElement
protected DataElement _docDocumentElement
protected DataElement _requestClassDocumentElement
protected DataElement _serializedDocumentElement
| Constructor Detail |
public ServerUpdateHandler()
| Method Detail |
public void setDataStore(DataStore dataStore)
setDataStore in class HandlerdataStore - public void addSender(Sender sender)
Sender. If
there are more than one clients, then this is how senders are added.
sender - a sender connected to a socketpublic void removeSender(Sender sender)
sender - the sender to remove
public void updateFile(String path,
byte[] bytes,
int size,
boolean binary)
updateFile in class UpdateHandlerpath - the name of the file on the clientbytes - the bytes to sendsize - the number of bytes to sendbinary - indicates whether to send the bytes and binary or text
public void updateFile(String path,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
updateFile in class UpdateHandlerpath - the name of the file on the clientbytes - the bytes to sendsize - the number of bytes to sendbinary - indicates whether to send the bytes and binary or textbyteStreamHandlerId - indicates the byte stream handler to receive the bytes
public void updateAppendFile(String path,
byte[] bytes,
int size,
boolean binary)
updateAppendFile in class UpdateHandlerpath - the name of the file on the clientbytes - the bytes to sendsize - the number of bytes to sendbinary - indicates whether to send the bytes and binary or text
public void updateAppendFile(String path,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
updateAppendFile in class UpdateHandlerpath - the name of the file on the clientbytes - the bytes to sendsize - the number of bytes to sendbinary - indicates whether to send the bytes and binary or textbyteStreamHandlerId - indicates the byte stream handler to receive the bytespublic void handle()
handle in class UpdateHandlerpublic void sendUpdates()
sendUpdates in class UpdateHandlerpublic void removeSenderWith(Socket socket)
socket - the socket on which a sender communicatespublic void requestClass(String className)
requestClass in class UpdateHandlerclassName - the name of the class to request
public void updateClassInstance(IRemoteClassInstance runnable,
String deserializebyteStreamHandlerId)
UpdateHandler
updateClassInstance in class UpdateHandlerrunnable - deserializebyteStreamHandlerId -
public void sendClass(String className,
String classByteStreamHandlerId)
sendClass in class UpdateHandlerclassName - the name of the class to sendclassByteStreamHandlerId - the name of the byte stream handler to use to receive the classpublic void addClassToSend(DataElement classElement)
classElement - the DataElement representing the class to be sentpublic void sendClass(String className)
sendClass in class UpdateHandlerclassName - the name of the class to sendpublic void sendKeepAliveRequest()
UpdateHandler
sendKeepAliveRequest in class UpdateHandlerpublic void sendKeepAliveConfirmation()
UpdateHandler
sendKeepAliveConfirmation in class UpdateHandlerpublic void waitForInput()
UpdateHandler
waitForInput in class UpdateHandler
|
Remote System Explorer DataStore Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||