|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.gram.Gram
public class Gram
This is the main class for using the Globus GRAM API It implements all of the GRAM API functionality such as job submission, canceling, gatekeeper pinging, and job signaling. It also allows for callback registering and unregistering.
Field Summary | |
---|---|
protected static java.util.Hashtable |
callbackHandlers
|
Constructor Summary | |
---|---|
Gram()
|
Method Summary | |
---|---|
static void |
cancel(GramJob job)
This function cancels an already running job. |
static void |
deactivateAllCallbackHandlers()
Deactivates all callback handlers. |
static CallbackHandler |
deactivateCallbackHandler(org.ietf.jgss.GSSCredential cred)
Deactivates a callback handler for a given credential. |
static int |
getActiveJobs()
Returns total number of jobs currently running for all credentials -- all callback handlers |
static int |
getActiveJobs(org.ietf.jgss.GSSCredential cred)
Returns number of jobs currently running for a specified credential (one credential one callback handler) |
static int |
jobSignal(GramJob job,
int signal,
java.lang.String arg)
This function sends a signal to a job. |
static void |
jobStatus(GramJob job)
This function updates the status of a job (within the job object), and throws an exception if the status is not OK. |
static void |
ping(org.ietf.jgss.GSSCredential cred,
java.lang.String resourceManagerContact)
Performs ping operation on the gatekeeper with specified user credentials. |
static void |
ping(java.lang.String resourceManagerContact)
Performs ping operation on the gatekeeper with default user credentials. |
static void |
registerListener(GramJob job)
This function registers the job for status updates. |
static void |
registerListener(GramJob job,
CallbackHandler handler)
|
static void |
renew(GramJob job,
org.ietf.jgss.GSSCredential newCred)
Requests that a globus job manager accept newly delegated credentials. |
static void |
renew(GramJob job,
org.ietf.jgss.GSSCredential newCred,
boolean limitedDelegation)
Requests that a globus job manager accept newly delegated credentials. |
static void |
request(java.lang.String resourceManagerContact,
GramJob job)
Submits a GramJob to specified gatekeeper as an interactive job. |
static void |
request(java.lang.String resourceManagerContact,
GramJob job,
boolean batchJob)
Submits a GramJob to specified gatekeeper as a interactive or batch job. |
static void |
request(java.lang.String resourceManagerContact,
GramJob job,
boolean batchJob,
boolean limitedDelegation)
Submits a GramJob to specified gatekeeper as a interactive or batch job. |
static void |
unregisterListener(GramJob job)
This function unregisters the job from callback listener. |
static void |
unregisterListener(GramJob job,
CallbackHandler handler)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.Hashtable callbackHandlers
Constructor Detail |
---|
public Gram()
Method Detail |
---|
public static int getActiveJobs()
public static int getActiveJobs(org.ietf.jgss.GSSCredential cred)
public static void ping(java.lang.String resourceManagerContact) throws GramException, org.ietf.jgss.GSSException
resourceManagerContact
- resource manager contact
GramException
- if an error occurs or user in unauthorized
org.ietf.jgss.GSSException
public static void ping(org.ietf.jgss.GSSCredential cred, java.lang.String resourceManagerContact) throws GramException, org.ietf.jgss.GSSException
cred
- user credentialsresourceManagerContact
- resource manager contact
GramException
- if an error occurs or user in unauthorized
org.ietf.jgss.GSSException
public static void request(java.lang.String resourceManagerContact, GramJob job) throws GramException, org.ietf.jgss.GSSException
resourceManagerContact
- resource manager contactjob
- gram job
GramException
- if an error occurs during submisson
org.ietf.jgss.GSSException
public static void request(java.lang.String resourceManagerContact, GramJob job, boolean batchJob) throws GramException, org.ietf.jgss.GSSException
resourceManagerContact
- resource manager contactjob
- gram jobbatchJob
- true if batch job, interactive otherwise
GramException
- if an error occurs during submisson
org.ietf.jgss.GSSException
public static void request(java.lang.String resourceManagerContact, GramJob job, boolean batchJob, boolean limitedDelegation) throws GramException, org.ietf.jgss.GSSException
resourceManagerContact
- resource manager contactjob
- gram jobbatchJob
- true if batch job, interactive otherwise.limitedDelegation
- true for limited delegation, false for full delegation.
limited delegation should be the default option.
GramException
- if an error occurs during submisson
org.ietf.jgss.GSSException
public static void renew(GramJob job, org.ietf.jgss.GSSCredential newCred) throws GramException, org.ietf.jgss.GSSException
job
- The job whose credentials are to be renewed/refreshednewCred
- The credentials to use in the delegation process
org.ietf.jgss.GSSException
- if a GSSAPI error occurs
GramException
- if a connection/communication error occurs or if
delegation failedpublic static void renew(GramJob job, org.ietf.jgss.GSSCredential newCred, boolean limitedDelegation) throws GramException, org.ietf.jgss.GSSException
job
- The job whose credentials are to be renewed/refreshednewCred
- The credentials to use in the delegation processlimitedDelegation
- Whether to use a full or limited proxy
org.ietf.jgss.GSSException
- if a GSSAPI error occurs
GramException
- if a connection/communication error occurs or if
delegation failedpublic static void cancel(GramJob job) throws GramException, org.ietf.jgss.GSSException
job
- job to be canceled
GramException
- if an error occurs during cancel
org.ietf.jgss.GSSException
public static void jobStatus(GramJob job) throws GramException, org.ietf.jgss.GSSException
job
- the job whose status is to be updated.
GramException
- if an error occurs during status update.
org.ietf.jgss.GSSException
public static int jobSignal(GramJob job, int signal, java.lang.String arg) throws GramException, org.ietf.jgss.GSSException
job
- the signaled jobsignal
- type of the signalarg
- argument of the signal
GramException
- if an error occurs during cancel
org.ietf.jgss.GSSException
public static void registerListener(GramJob job) throws GramException, org.ietf.jgss.GSSException
job
- the job
GramException
- if an error occurs during registration
org.ietf.jgss.GSSException
public static void registerListener(GramJob job, CallbackHandler handler) throws GramException, org.ietf.jgss.GSSException
GramException
org.ietf.jgss.GSSException
public static void unregisterListener(GramJob job) throws GramException, org.ietf.jgss.GSSException
job
- the job
GramException
- if an error occurs during unregistering
org.ietf.jgss.GSSException
public static void unregisterListener(GramJob job, CallbackHandler handler) throws GramException, org.ietf.jgss.GSSException
GramException
org.ietf.jgss.GSSException
public static void deactivateAllCallbackHandlers()
public static CallbackHandler deactivateCallbackHandler(org.ietf.jgss.GSSCredential cred)
cred
- the credential of the callback handler.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |