ZetaGrid v1.9

zeta
Class TaskServer

java.lang.Object
  |
  +--zeta.TaskServer

public class TaskServer
extends java.lang.Object

Defines the task at the server side.


Field Summary
private  java.math.BigInteger decryptionNumber
          Decryption number for the Decryptor (half-certified Diffie-Hellman protocol).
private static java.math.BigInteger defaultDecryptionNumber
          The default decryption number for the half-certified Diffie-Hellman protocol.
private  byte[] encryptionClass
          The bytes that make up the class data which contains the key to encrypt the results of this task.
private  java.lang.String encryptionSignature
          Digital signature of the class name which contains the key to encrypt the results of this task.
private  int id
          ID of the task.
private static java.util.Map mapTask
          Maps a task name on a task.
private  java.lang.String name
          The unique name of the task.
private  java.util.Map parameter
          Parameters of the HttpRequest.
private  TaskRequestWorkUnitProcessor requestProcessor
          An object which processes the request for work units of the task.
private  TaskResultProcessor resultProcessor
          An object for the specified class name which processes the task results.
 
Constructor Summary
private TaskServer(int id, java.lang.String name, java.util.Map parameter)
          The method getTask must be used.
private TaskServer(TaskServer taskServer, ZetaServlet servlet, java.util.Map parameter)
           
 
Method Summary
 java.math.BigInteger getDecryptionNumber()
          Returns the decryption number for the Decryptor (half-certified Diffie-Hellman protocol).
private static java.math.BigInteger getDefaultDecryptionNumber(ZetaServlet servlet)
          Returns the default decryption number for the half-certified Diffie-Hellman protocol.
 byte[] getEncryptionClass()
          Returns the bytes that make up the class data which contains the key to encrypt the results of this task.
 java.lang.String getEncryptionSignature()
          Returns the digital signature (big integer radix 32) of the class name which contains the key to encrypt the results of this task.
 int getId()
          Returns the ID of the task.
 java.lang.String getName()
          Returns the unique name of the task.
 java.util.Map getParameter()
          Returns the decrypted parameters of the HttpRequest.
 java.lang.String getParameter(java.lang.String key)
          Returns a value for a key from the specified map with parameters.
private static TaskRequestWorkUnitProcessor getRequestProcessor(ZetaServlet servlet, java.sql.Statement stmt, java.lang.String requestProcessorName, java.util.Map parameter)
          Returns an object for the specified class name which processes the request for work units of the task.
 TaskRequestWorkUnitProcessor getRequestWorkUnitProcessor()
          Returns an object which processes the request for work units of the task.
 TaskResultProcessor getResultProcessor()
          Returns an object which processes the task results.
private static TaskResultProcessor getResultProcessor(ZetaServlet servlet, java.sql.Statement stmt, java.lang.String resultProcessorName, java.util.Map parameter)
          Returns an object for the specified class name which processes the task results.
static TaskServer getTask(ZetaServlet servlet, java.util.Map parameter)
          Returns the task object of a specified task name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private int id
ID of the task.


name

private java.lang.String name
The unique name of the task.


encryptionClass

private byte[] encryptionClass
The bytes that make up the class data which contains the key to encrypt the results of this task.


encryptionSignature

private java.lang.String encryptionSignature
Digital signature of the class name which contains the key to encrypt the results of this task. A big integer radix 32.


decryptionNumber

private java.math.BigInteger decryptionNumber
Decryption number for the Decryptor (half-certified Diffie-Hellman protocol).


requestProcessor

private TaskRequestWorkUnitProcessor requestProcessor
An object which processes the request for work units of the task.


resultProcessor

private TaskResultProcessor resultProcessor
An object for the specified class name which processes the task results.


parameter

private java.util.Map parameter
Parameters of the HttpRequest.


mapTask

private static java.util.Map mapTask
Maps a task name on a task.


defaultDecryptionNumber

private static java.math.BigInteger defaultDecryptionNumber
The default decryption number for the half-certified Diffie-Hellman protocol.

Constructor Detail

TaskServer

private TaskServer(int id,
                   java.lang.String name,
                   java.util.Map parameter)
The method getTask must be used.

Parameters:
id - ID of the task
name - name of the task

TaskServer

private TaskServer(TaskServer taskServer,
                   ZetaServlet servlet,
                   java.util.Map parameter)
Method Detail

getTask

public static TaskServer getTask(ZetaServlet servlet,
                                 java.util.Map parameter)
                          throws javax.servlet.ServletException,
                                 java.sql.SQLException
Returns the task object of a specified task name.

Parameters:
servlet - surrounding servlet
Returns:
the task object of a specified task ID if it is defined, otherwise null.
Throws:
java.sql.SQLException - if a database access error occurs.
javax.servlet.ServletException

getId

public int getId()
Returns the ID of the task.

Returns:
the ID of the task.

getName

public java.lang.String getName()
Returns the unique name of the task.

Returns:
the unique name of the task.

getEncryptionClass

public byte[] getEncryptionClass()
Returns the bytes that make up the class data which contains the key to encrypt the results of this task.

Returns:
the bytes that make up the class data which contains the key to encrypt the results of this task.

getEncryptionSignature

public java.lang.String getEncryptionSignature()
Returns the digital signature (big integer radix 32) of the class name which contains the key to encrypt the results of this task.

Returns:
the digital signature (big integer radix 32) of the class name which contains the key to encrypt the results of this task.

getDecryptionNumber

public java.math.BigInteger getDecryptionNumber()
Returns the decryption number for the Decryptor (half-certified Diffie-Hellman protocol).

Returns:
the decryption number for the Decryptor (half-certified Diffie-Hellman protocol).

getRequestWorkUnitProcessor

public TaskRequestWorkUnitProcessor getRequestWorkUnitProcessor()
Returns an object which processes the request for work units of the task.

Returns:
an object which processes the request for work units of the task or null if it is not defined.

getResultProcessor

public TaskResultProcessor getResultProcessor()
Returns an object which processes the task results.

Returns:
an object which processes the task results or null if it is not defined.

getParameter

public java.util.Map getParameter()
Returns the decrypted parameters of the HttpRequest.

Returns:
the decrypted parameters of the HttpRequest.

getParameter

public java.lang.String getParameter(java.lang.String key)
Returns a value for a key from the specified map with parameters.

Parameters:
key - key
Returns:
value for a key from the specified map with parameters; null if no value was found.

getRequestProcessor

private static TaskRequestWorkUnitProcessor getRequestProcessor(ZetaServlet servlet,
                                                                java.sql.Statement stmt,
                                                                java.lang.String requestProcessorName,
                                                                java.util.Map parameter)
Returns an object for the specified class name which processes the request for work units of the task.

Parameters:
servlet - surrounding servlet
stmt - statement object's database
requestProcessorName - class name which processes the request for work units of the task
Returns:
an object for the specified class name which processes the request for work units of the task or null if the class is not defined.

getResultProcessor

private static TaskResultProcessor getResultProcessor(ZetaServlet servlet,
                                                      java.sql.Statement stmt,
                                                      java.lang.String resultProcessorName,
                                                      java.util.Map parameter)
Returns an object for the specified class name which processes the task results.

Parameters:
servlet - surrounding servlet
stmt - statement object's database
resultProcessorName - class name which processes the task results
Returns:
an object for the specified class name which processes the task results or null if the class is not defined.

getDefaultDecryptionNumber

private static java.math.BigInteger getDefaultDecryptionNumber(ZetaServlet servlet)
                                                        throws javax.servlet.ServletException,
                                                               java.sql.SQLException
Returns the default decryption number for the half-certified Diffie-Hellman protocol.

Parameters:
servlet - surrounding servlet
Returns:
the default decryption number for the half-certified Diffie-Hellman protocol.
Throws:
java.sql.SQLException - if a database access error occurs.
javax.servlet.ServletException

ZetaGrid v1.9

For further technical papers, see ZetaGrid Technical Documentation.
 
Copyright © 2001,2002 Sebastian Wedeniwski. All Rights Reserved.