|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--zeta.handler.GetClientHandler
Handles a GET request for the needed environment of a task. The request must contains the following parameters:
task - name of the task.hostname - name of the host of the resource provider.hostaddr - TCP/IP address of the host of the resource provider.os_name - name of the operating system of the resource provider.os_version - version of the operating system of the resource provider.os_arch - processor architecture of the requested resource.files - list of local files of the resource which are separated by comma; may be truncated
if the list is lager than 900 characters.hostname and hostaddr
can retrieve an environment for computation.hostname
can retrieve an environment for computation.task_id, os_name, os_arch
and the local files depend on last update of the requested resource.
Note: Programs are added earlier in the ZIP file which are platform independent.files, hostaddr, os_name, os_version,
os_arch with the current timestamt on the back-end database for the requested resource.
| Field Summary | |
private java.lang.String |
contentLastZip1
Filenames of one last transferred ZIP file. |
private java.lang.String |
contentLastZip2
Filenames of one last transferred ZIP file. |
private static java.util.Map |
lastKeys
Queue containing the keys of the last 1000 requested clients. |
(package private) long |
lastRefreshSignature
Timestamp in milliseconds when the last refresh of the signature occurs. |
private static java.util.TreeMap |
lastTimestampsOfKeys
|
private java.io.ByteArrayOutputStream |
lastZip1
Data of one last transferred ZIP file. |
private java.io.ByteArrayOutputStream |
lastZip2
Data of one last transferred ZIP file. |
private static int |
MAX_QUEUE_KEY_SIZE
|
private java.util.List |
programs
List of the current programs except the file 'signature.txt': task_id,name,os_name,os_arch,last_update where size = 0 mod 5 |
private ZetaServlet |
servlet
Servlet which owns this handler. |
private java.sql.Timestamp |
signatureLastUpdate
Timestamp of the last update of the file 'signature.txt'. |
private java.io.ByteArrayOutputStream |
signatureStream
Data of the file 'signature.txt'. |
private java.lang.String |
signatureVersion
Version of the file 'signature.txt'. |
private int |
usageLastZip1
Number of using lastZip1. |
private int |
usageLastZip2
Number of using lastZip2. |
| Constructor Summary | |
GetClientHandler(ZetaServlet servlet)
|
|
| Method Summary | |
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handles a GET request for the needed environment of a task. |
(package private) static long |
getKeyTimestamp(java.lang.String key)
Checks if the specified key of a client retrieved an environment of the last 1000 clients. |
private static void |
putKey(java.lang.String key)
Stores the specified key of a client on a queue for at least 10 minutes. |
private boolean |
refreshSignature(java.sql.Statement stmt)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final int MAX_QUEUE_KEY_SIZE
private static java.util.Map lastKeys
private static java.util.TreeMap lastTimestampsOfKeys
long lastRefreshSignature
private java.lang.String signatureVersion
private java.sql.Timestamp signatureLastUpdate
private java.io.ByteArrayOutputStream signatureStream
private java.util.List programs
private java.lang.String contentLastZip1
private java.lang.String contentLastZip2
private int usageLastZip1
lastZip1.
private int usageLastZip2
lastZip2.
private java.io.ByteArrayOutputStream lastZip1
private java.io.ByteArrayOutputStream lastZip2
private ZetaServlet servlet
| Constructor Detail |
public GetClientHandler(ZetaServlet servlet)
servlet - servlet which owns this handler.| Method Detail |
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.sql.SQLException,
java.io.IOException
req must contains the following parameters:
task - name of the task.hostname - name of the host of the resource provider.hostaddr - TCP/IP address of the host of the resource provider.os_name - name of the operating system of the resource provider.os_version - version of the operating system of the resource provider.os_arch - processor architecture of the requested resource.files - list of local files of the resource which are separated by comma; may be truncated
if the list is lager than 900 characters.resp contains a ZIP file with digital signatures 'signature.txt' and the needed
environment, e.g. libraries.
doGet in interface GetHandlerjavax.servlet.ServletException
java.sql.SQLException
java.io.IOException
private boolean refreshSignature(java.sql.Statement stmt)
throws java.io.IOException,
javax.servlet.ServletException,
java.sql.SQLException
java.io.IOException
javax.servlet.ServletException
java.sql.SQLExceptionprivate static void putKey(java.lang.String key)
key - key of a client which retrieved an environmentstatic long getKeyTimestamp(java.lang.String key)
key - key of a client which retrieved an environment
|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||