|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.infoengine.SAK.Task
public class Task
This class supports dynamic compilation, instantiation, and execution of Info*Engine tasks.
| Field Summary | |
|---|---|
static java.lang.String |
RESOURCE
|
static int |
TYPE_CREDENTIALS_MAPPER
|
static int |
TYPE_NORMAL
|
| Constructor Summary | |
|---|---|
Task()
Constructs an instance that is initialized with no task URI. |
|
Task(java.lang.String uri)
Constructs an instance that is initialized with a specified task URI. |
|
Task(java.lang.String uri,
java.lang.String processor)
Constructs an instance that causes a task to be executed on a remote task processor. |
|
Task(java.lang.String uri,
java.util.Vector processors)
Constructs an instance that causes a task to be executed on a remote task processor. |
|
| Method Summary | |
|---|---|
void |
addGroup(Group group)
Adds a group to the task's VDB. |
void |
addParam(java.lang.String name,
java.lang.Object value)
Adds a task parameter value. |
void |
addProcessor(java.lang.String name)
Adds a name to the vector of remote task processor names. |
void |
compile()
Compiles the task if it needs to be compiled. |
static IeCollection |
executeTask(java.lang.String uri,
java.lang.String processor,
Task task,
IeCollection vdb,
Group form)
Executes a task specified by URI. |
static IeCollection |
executeTask(java.lang.String uri,
Task task,
java.lang.Boolean isCredentialsMapper)
Executes a task specified by URI. |
static IeCollection |
executeTask(java.lang.String uri,
java.util.Vector processors,
Task task,
IeCollection vdb,
Group form)
Executes a task specified by URI. |
static void |
executeTaskRemotely(java.lang.String uri,
Task task,
IeService service,
IeMultipartInputStream is,
java.io.OutputStream os,
java.util.Vector processors)
Executes a task in a remote task processor. |
Group |
getAuthMapGroup()
Returns the group containing authentication mapping information. |
Group |
getCookieGroup()
Returns the group containing attributes that serve as cookie information. |
Group |
getFormGroup()
Returns the group containing attributes that serve as form variables. |
Group |
getGroup(java.lang.String name)
Returns a group from the task's VDB. |
java.util.Enumeration |
getGroupNames()
Returns the names of all groups in the task's VDB. |
IeMultipartInputStream |
getInputStream()
Returns the input stream currently associated with the task. |
com.infoengine.log.LogWriter |
getLog()
Returns the log writer currently associated with the object. |
java.io.OutputStream |
getOutputStream()
Returns the output stream currently associated with this task object. |
java.lang.Object |
getParam(java.lang.String name)
Returns the value of a task parameter. |
java.util.Enumeration |
getParamNames()
Returns the names of all task parameters currently defined. |
java.util.Vector |
getProcessors()
Returns the vector of remote task processor names. |
Group |
getServerGroup()
Returns the group containing attributes that serve as server variables. |
IeService |
getService()
Returns the server context currently associated with this task. |
Tasklet |
getTasklet()
Returns the compiled tasklet associated with this task object. |
int |
getTaskType()
Returns the task type currently associated with this task. |
java.lang.String |
getTaskURI()
Returns the URI of the Info*Engine task currently associated with the object. |
IeCollection |
getVDB()
Returns the VDB of the task. |
void |
initialize(Tasklet tasklet,
java.lang.String uri)
Initializes the task from an initialized tasklet (usually the parent tasklet of a new subtask). |
void |
invoke()
Executes the compiled tasklet. |
boolean |
isInterruptable()
Returns whether or not this task is intended to be interruptable accrossed VM boundaries. |
void |
recover()
Recovers the saved state of a task. |
void |
removeAllParams()
Removes all parameters from the set of task parameters that will be passed to the tasklet associated with this task. |
void |
removeParam(java.lang.String name)
Removes a parameter from the set of task parameters that will be passed to the tasklet associated with this task. |
void |
setAuthMapGroup(Group group)
Sets the group containing authentication mapping information. |
void |
setCheckpointProcessor(java.lang.String uniqueIdentifier,
com.infoengine.SAK.CheckpointProcessor checkpointProcessor)
Sets the checkpoint processor associated with the Task object. |
void |
setCookieGroup(Group group)
Sets the group containing attributes that serve as cookie information. |
void |
setFormGroup(Group group)
Sets the group containing attributes that serve as form variables. |
void |
setInputStream(IeMultipartInputStream is)
Sets the input stream from which the task can read BLOB data. |
void |
setInputStream(java.io.InputStream is,
java.lang.String contentType,
java.lang.String name,
java.lang.String filename)
Sets the input stream from which the task can read BLOB data. |
void |
setInputStream(javax.servlet.ServletRequest request)
Sets the input stream from which the task can read BLOB data. |
void |
setInterruptable(boolean interruptable)
Sets the interruptable flag on this task. |
void |
setLog(com.infoengine.log.LogWriter log)
Sets the log writer associated with the object. |
void |
setOutputStream(java.io.OutputStream os)
Sets the output stream associated with this task object. |
void |
setOutputStream(java.io.Writer writer)
Sets the output stream associated with this task object. |
void |
setParam(java.lang.String name,
java.lang.Object value)
Sets the value of a task parameter. |
void |
setProcessors(java.util.Vector processors)
Sets the vector of remote task processor names associated with the task. |
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Associates an HTTP servlet request object with the task. |
void |
setServerAttribute(java.lang.String name,
java.lang.String value)
Sets an attribute in the server context group (@SERVER). |
void |
setServerGroup(Group group)
Sets the group containing attributes that serve as server variables. |
void |
setService(IeService service)
Sets the server context associated with this task. |
void |
setTaskType(int taskType)
Sets the type of the task. |
void |
setTaskURI(java.lang.String taskURI)
Sets the URI of the Info*Engine task to associate with the object. |
void |
setUsername(java.lang.String user)
Sets the "auth-user" attribute value in the SERVER context group (@SERVER). |
void |
setUsername(java.lang.String user,
java.lang.String signer)
Sets the "auth-user" attribute value in the SERVER context group and also sets "auth-signer" and "auth-signature" attribute values that provide a digital signature for the username and the name of the signer. |
void |
setUsername(java.lang.String user,
java.lang.String signer,
java.security.PrivateKey key)
Sets the "auth-user" attribute value in the SERVER context group and also sets "auth-signer" and "auth-signature" attribute values that provide a digital signature for the username and the name of the signer. |
void |
setUsername(java.lang.String user,
java.lang.String signer,
java.lang.String password,
java.security.KeyStore keystore)
Sets the "auth-user" attribute value in the SERVER context group and also sets "auth-signer" and "auth-signature" attribute values that provide a digital signature for the username and the name of the signer. |
void |
setVDB(IeCollection vdb)
Sets the VDB of the task. |
static void |
signUsername(Task task,
java.lang.String signer)
Sets the "auth-signer" and "auth-signature" attribute values that provide a digital signature for the "auth-user" attribute of the SERVER context group of a specific task. |
static void |
signUsername(Task task,
java.lang.String signer,
java.security.PrivateKey key)
Signs the auth-user attribute value in a SERVER context group using a specific signer's name and private key. |
static void |
signUsername(Task task,
java.lang.String user,
java.lang.String signer)
Sets the "auth-user" attribute value in the SERVER context group of a specific task and also sets "auth-signer" and "auth-signature" attribute values that provide a digital signature for the username and the name of the signer. |
static void |
signUsername(Task task,
java.lang.String user,
java.lang.String signer,
java.security.PrivateKey key)
Sets a specific value for the auth-user attribute value in the SERVER context group of a specific task, and signs it using a specific signer's name and private key. |
static void |
signUsername(Task task,
java.lang.String user,
java.lang.String signer,
java.lang.String password,
java.security.KeyStore keystore)
Sets the "auth-user" attribute value in the SERVER context group of a specific task and also sets "auth-signer" and "auth-signature" attribute values that provide a digital signature for the username and the name of the signer. |
java.lang.String |
toString()
Returns a string containing the output currently associated with this task. |
static boolean |
verifyUsername(Task task)
Verifies the authenticity of the auth-user attribute value in a SERVER context group based upon the auth-signer and auth-signature attribute values of the same group. |
static boolean |
verifyUsername(Task task,
java.security.cert.Certificate certificate)
Verifies the authenticity of the auth-user attribute value in a SERVER context group based upon the auth-signer and auth-signature attribute values of the same group. |
static boolean |
verifyUsername(Task task,
java.security.KeyStore keystore)
Verifies the authenticity of the auth-user attribute value in a SERVER context group based upon the auth-signer and auth-signature attribute values of the same group. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RESOURCE
public static final int TYPE_NORMAL
public static final int TYPE_CREDENTIALS_MAPPER
| Constructor Detail |
|---|
public Task()
public Task(java.lang.String uri)
uri - The URI of the Info*Engine task to associate with this
object.
public Task(java.lang.String uri,
java.util.Vector processors)
uri - The URI of the Info*Engine task to associate with this
object.processors - A vector of task processor names. Each of these
processors has a copy of the specified task. The
processors are tried in sequence until a connection
can be created successfully to one of them.
public Task(java.lang.String uri,
java.lang.String processor)
uri - The URI of the Info*Engine task to associate with this
object.processor - The name of the task processor on which to execute
the task.| Method Detail |
|---|
public java.lang.String getTaskURI()
public void setTaskURI(java.lang.String taskURI)
taskURI - The new task URI.public Tasklet getTasklet()
public void setService(IeService service)
service - The new server context.public IeService getService()
public void setTaskType(int taskType)
taskType - The new task type.public int getTaskType()
public void setLog(com.infoengine.log.LogWriter log)
log - The new log writer.public com.infoengine.log.LogWriter getLog()
public void setCheckpointProcessor(java.lang.String uniqueIdentifier,
com.infoengine.SAK.CheckpointProcessor checkpointProcessor)
uniqueIdentifier - The unique identifier assigned to the task
instance. This will be passed to the
checkpoint processor object to aid it in
associating saved state with a specific
task instance over time.checkpointProcessor - The object that can be called to save
a task's state. If null, state information
will not be saved for the task.
public void recover()
throws IEException
IEException - if state can not be recovered or queried
successfully.public void setProcessors(java.util.Vector processors)
processors - The vector of remote task processor names.public java.util.Vector getProcessors()
public void addProcessor(java.lang.String name)
name - The name of a remote task processor.
public void setInputStream(java.io.InputStream is,
java.lang.String contentType,
java.lang.String name,
java.lang.String filename)
throws java.io.IOException
is - The input stream.contentType - The MIME content type associated with the stream.name - The form variable name, if any, associated with the stream.filename - The file name, if any, associated with the stream.
java.io.IOException - if the input stream can not be set.
public void setInputStream(javax.servlet.ServletRequest request)
throws java.io.IOException
request - The servlet request object from which the input
stream will be obtained.
java.io.IOException - if the input stream can not be set.public void setInputStream(IeMultipartInputStream is)
is - The Info*Engine multipart input stream from which the task
can read BLOB data.public IeMultipartInputStream getInputStream()
public void setOutputStream(java.io.OutputStream os)
os - The new output stream.public void setOutputStream(java.io.Writer writer)
writer - The writer to be wrapped in an output stream.public java.io.OutputStream getOutputStream()
public void setParam(java.lang.String name,
java.lang.Object value)
name - The name of the parameter to set.value - The value to associate with the name.
public void addParam(java.lang.String name,
java.lang.Object value)
name - The name of the parameter to add.value - The value to associate with the name.public java.lang.Object getParam(java.lang.String name)
name - The name of the parameter to return.
public java.util.Enumeration getParamNames()
public void removeParam(java.lang.String name)
name - The name of the parameter to remove.public void removeAllParams()
public void setAuthMapGroup(Group group)
group - The new group containing authentication mapping
information.public Group getAuthMapGroup()
public void setFormGroup(Group group)
group - The new group containing form variables.public Group getFormGroup()
public void setInterruptable(boolean interruptable)
interruptable - Whether or not to allow interruption accrossed VM boundaries.public boolean isInterruptable()
public void setServerGroup(Group group)
group - The new group containing server variables.public Group getServerGroup()
public void setServerAttribute(java.lang.String name,
java.lang.String value)
name - The name of the attribute to set.value - The value of the attribute.public void setUsername(java.lang.String user)
user - The username to set.
public void setUsername(java.lang.String user,
java.lang.String signer)
throws IEException
user - The username to set. Usually, this is a user's LDAP
directory distinguished name.signer - The alias of the signer. This is the alias that
selects a private key from the keystore. The alias is
conveyed to the verifier in the auth-signer attribute,
so it must be known to the verifier because the
verifier will use it to select a public certificate
from its keystore.
IEException - if the signer's private key can not be
obtained from the keystore or the key can not
be used successfully in creating the
signature.Signature
public void setUsername(java.lang.String user,
java.lang.String signer,
java.lang.String password,
java.security.KeyStore keystore)
throws IEException
user - The username to set. Usually, this is a user's LDAP
directory distinguished name.signer - The alias of the signer. This is the alias that
selects a private key from the keystore. The alias is
conveyed to the verifier in the auth-signer attribute,
so it must be known to the verifier because the
verifier will use it to select a public certificate
from its keystore.password - The password to use in recovering the signer's
private key from the keystore.keystore - The keystore object containing the private key of
the signer.
IEExceptionSignature
public void setUsername(java.lang.String user,
java.lang.String signer,
java.security.PrivateKey key)
throws IEException
user - The username to set. Usually, this is a user's LDAP
directory distinguished name.signer - The alias of the signer. This is the alias that
selects a private key from the keystore. The alias is
conveyed to the verifier in the auth-signer attribute,
so it must be known to the verifier because the
verifier will use it to select a public certificate
from its keystore.key - The private key to use in generating the signed
authorization.
IEExceptionSignature
public static void signUsername(Task task,
java.lang.String signer)
throws IEException
task - The com.infoengine.object.factory.Task instance containing
the SERVER context group.signer - The alias of the signer. This is the alias that
selects a private key from the keystore. The alias is
conveyed to the verifier in the auth-signer attribute,
so it must be known to the verifier because the
verifier will use it to select a public certificate
from its keystore.
IEException - if the signer's private key can not be
obtained from the keystore or the key can not
be used successfully in creating the signature.Signature
public static void signUsername(Task task,
java.lang.String user,
java.lang.String signer)
throws IEException
task - The com.infoengine.object.factory.Task instance containing
the SERVER context group.user - The username to set. Usually, this is a user's LDAP
directory distinguished name.signer - The alias of the signer. This is the alias that
selects a private key from the keystore. The alias is
conveyed to the verifier in the auth-signer attribute,
so it must be known to the verifier because the
verifier will use it to select a public certificate
from its keystore.
IEException - if the signer's private key can not be
obtained from the keystore or the key can not
be used successfully in creating the signature.Signature
public static void signUsername(Task task,
java.lang.String user,
java.lang.String signer,
java.lang.String password,
java.security.KeyStore keystore)
throws IEException
task - The com.infoengine.object.factory.Task instance containing
the SERVER context group.user - The username to set. Usually, this is a user's LDAP
directory distinguished name.signer - The alias of the signer. This is the alias that
selects a private key from the keystore. The alias is
conveyed to the verifier in the auth-signer attribute,
so it must be known to the verifier because the
verifier will use it to select a public certificate
from its keystore.password - The password to use in recovering the signer's
private key from the keystore.keystore - The keystore object containing the private key of
the signer.
IEException - if an exception prevents the auth-user
value from being signed.Signature
public static void signUsername(Task task,
java.lang.String user,
java.lang.String signer,
java.security.PrivateKey key)
throws IEException
task - The com.infoengine.object.factory.Task instance containing
the SERVER context group.user - The value to set for the auth-user attribute of the
SERVER context group.signer - The signer's name. This name will be used by the
receiving system to look up the signer's public key.key - The signer's private key.
IEException - if an exception prevents the auth-user
value from being signed.
public static void signUsername(Task task,
java.lang.String signer,
java.security.PrivateKey key)
throws IEException
task - The com.infoengine.object.factory.Task instance containing
the SERVER context group with the auth-user attribute to
be signed.signer - The signer's name. This name will be used by the
receiving system to look up the signer's public key.key - The signer's private key.
IEException - if an exception prevents the auth-user
value from being signed.
public static boolean verifyUsername(Task task)
throws IEException
task - The com.infoengine.object.factory.Task instance containing
the SERVER context group with the attributes to be
verified.
IEException - if an exception prevents the auth-user
value from being verified.
public static boolean verifyUsername(Task task,
java.security.KeyStore keystore)
throws IEException
task - The com.infoengine.object.factory.Task instance containing
the SERVER context group with the attributes to be
verified.keystore - The keystore from which to obtain the signer's
public certificate.
IEException - if an exception prevents the auth-user
value from being verified.
public static boolean verifyUsername(Task task,
java.security.cert.Certificate certificate)
throws IEException
task - The com.infoengine.object.factory.Task instance containing
the SERVER context group with the attributes to be
verified.certificate - The signer's public certificate.
IEException - if an exception prevents the auth-user
value from being verified.public void setCookieGroup(Group group)
group - The new group containing cookie information.public Group getCookieGroup()
public void setVDB(IeCollection vdb)
vdb - The new VDBpublic IeCollection getVDB()
public void addGroup(Group group)
group - the group to be addedpublic Group getGroup(java.lang.String name)
name - the name of the group to be returned
public java.util.Enumeration getGroupNames()
public void initialize(Tasklet tasklet,
java.lang.String uri)
throws IEException
tasklet - the reference tasklet from which to initialize this taskuri - the URI of the source for this task
IEException
public void setRequest(javax.servlet.http.HttpServletRequest request)
throws java.io.IOException
request - The HTTP servlet request object.
java.io.IOException
public void invoke()
throws IEException,
java.io.IOException
IEException - if an error other than an I/O error occurs.
java.io.IOException - if an I/O error occurs.
public void compile()
throws IEException,
java.io.IOException
IEException - if an error other than an I/O error occurs.
java.io.IOException - if an I/O error occurs.
public static IeCollection executeTask(java.lang.String uri,
Task task,
java.lang.Boolean isCredentialsMapper)
throws IEException
uri - The URI of the task to execute.task - The task from which to derive the server context group for
the task.isCredentialsMapper - Indicates whether the task to be executed
is a credentials mapper task.
IEException - if the task is not executed successfully.
public static IeCollection executeTask(java.lang.String uri,
java.lang.String processor,
Task task,
IeCollection vdb,
Group form)
throws IEException
uri - The URI of the task to execute.processor - The name of the remote task processor on which to
execute the task, null if the task should be executed
locally.task - The task from which to derive the context groups and input
and output streams for the task.vdb - The VDB collection with which to initialize the task.form - The FORM context group for the task.
IEException - if the task is not executed successfully.
public static IeCollection executeTask(java.lang.String uri,
java.util.Vector processors,
Task task,
IeCollection vdb,
Group form)
throws IEException
uri - The URI of the task to execute.processors - A vector containing the names of the remote task
processors on which the task can be executed,
null if the task should be executed locally.task - The task from which to derive the context groups and input
and output streams for the task.vdb - The VDB collection with which to initialize the task.form - The FORM context group for the task.
IEException - if the task is not executed successfully.
public static void executeTaskRemotely(java.lang.String uri,
Task task,
IeService service,
IeMultipartInputStream is,
java.io.OutputStream os,
java.util.Vector processors)
throws IEException,
java.io.IOException
uri - The URI of the task to be executed.task - The task from which to derive the context groups for the
remote task.service - The service object containing a VDB.is - The input stream of the task.os - The output stream of the task.processors - The vector of task processor names.
IEException - if an error other than an I/O error occurs
during execution of the tasklet.
java.io.IOException - if an I/O error occurs.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||