public class Gram extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Hashtable |
callbackHandlers |
| Constructor and Description |
|---|
Gram() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cancel(GramJob job)
This function cancels an already running job.
|
static void |
deactivateAllCallbackHandlers()
Deactivates all callback handlers.
|
static CallbackHandler |
deactivateCallbackHandler(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(GSSCredential cred)
Returns number of jobs currently running
for a specified credential (one credential one callback handler)
|
static int |
jobSignal(GramJob job,
int signal,
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(GSSCredential cred,
String resourceManagerContact)
Performs ping operation on the gatekeeper with
specified user credentials.
|
static void |
ping(GSSCredential cred,
String resourceManagerContact,
boolean forceSSLV3ForGram)
Performs ping operation on the gatekeeper with
specified user credentials.
|
static void |
ping(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,
GSSCredential newCred)
Requests that a globus job manager accept newly delegated credentials.
|
static void |
renew(GramJob job,
GSSCredential newCred,
boolean limitedDelegation)
Requests that a globus job manager accept newly delegated credentials.
|
static void |
request(String resourceManagerContact,
GramJob job)
Submits a GramJob to specified gatekeeper as an
interactive job.
|
static void |
request(String resourceManagerContact,
GramJob job,
boolean batchJob)
Submits a GramJob to specified gatekeeper as
a interactive or batch job.
|
static void |
request(String resourceManagerContact,
GramJob job,
boolean batchJob,
boolean limitedDelegation)
Submits a GramJob to specified gatekeeper as
a interactive or batch job.
|
static void |
request(String resourceManagerContact,
GramJob job,
boolean batchJob,
boolean limitedDelegation,
boolean forceSSLV3ForGram)
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) |
protected static Hashtable callbackHandlers
public static int getActiveJobs()
public static int getActiveJobs(GSSCredential cred)
public static void ping(String resourceManagerContact) throws GramException, GSSException
resourceManagerContact - resource manager contactGramException - if an error occurs or user in unauthorizedGSSExceptionpublic static void ping(GSSCredential cred, String resourceManagerContact) throws GramException, GSSException
cred - user credentialsresourceManagerContact - resource manager contactGramException - if an error occurs or user in unauthorizedGSSExceptionpublic static void ping(GSSCredential cred, String resourceManagerContact, boolean forceSSLV3ForGram) throws GramException, GSSException
cred - user credentialsresourceManagerContact - resource manager contactforceSSLV3ForGram - Communication with GRAM servers will currently only succeed with
SSLv3 and a narrow set of cipher suites. So, applications attempting
communication with GRAM must set this to true to force the GSSAPI layer to constrain
JSSE to SSLv3 and SSL_RSA_WITH_3DES_EDE_CBC_SHA when confidentiality is requested via
requestConf() and SSL_RSA_WITH_NULL_SHA otherwise.
Also see gss/src/main/java/org/globus/gsi/gssapi/Java_GSI_GSSAPI.html.GramException - if an error occurs or user in unauthorizedGSSExceptionpublic static void request(String resourceManagerContact, GramJob job) throws GramException, GSSException
resourceManagerContact - resource manager contactjob - gram jobGramException - if an error occurs during submissonGSSExceptionpublic static void request(String resourceManagerContact, GramJob job, boolean batchJob) throws GramException, GSSException
resourceManagerContact - resource manager contactjob - gram jobbatchJob - true if batch job, interactive otherwiseGramException - if an error occurs during submissonGSSExceptionpublic static void request(String resourceManagerContact, GramJob job, boolean batchJob, boolean limitedDelegation) throws GramException, 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 submissonGSSExceptionpublic static void request(String resourceManagerContact, GramJob job, boolean batchJob, boolean limitedDelegation, boolean forceSSLV3ForGram) throws GramException, 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.forceSSLV3ForGram - Communication with GRAM servers will currently only succeed with
SSLv3 and a narrow set of cipher suites. So, applications attempting
communication with GRAM must set this to true to force the GSSAPI layer to constrain
JSSE to SSLv3 and SSL_RSA_WITH_3DES_EDE_CBC_SHA when confidentiality is requested via
requestConf() and SSL_RSA_WITH_NULL_SHA otherwise.
Also see gss/src/main/java/org/globus/gsi/gssapi/Java_GSI_GSSAPI.html.GramException - if an error occurs during submissonGSSExceptionpublic static void renew(GramJob job, GSSCredential newCred) throws GramException, GSSException
job - The job whose credentials are to be renewed/refreshednewCred - The credentials to use in the delegation processGSSException - if a GSSAPI error occursGramException - if a connection/communication error occurs or if
delegation failedpublic static void renew(GramJob job, GSSCredential newCred, boolean limitedDelegation) throws GramException, 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 proxyGSSException - if a GSSAPI error occursGramException - if a connection/communication error occurs or if
delegation failedpublic static void cancel(GramJob job) throws GramException, GSSException
job - job to be canceledGramException - if an error occurs during cancelGSSExceptionpublic static void jobStatus(GramJob job) throws GramException, GSSException
job - the job whose status is to be updated.GramException - if an error occurs during status update.GSSExceptionpublic static int jobSignal(GramJob job, int signal, String arg) throws GramException, GSSException
job - the signaled jobsignal - type of the signalarg - argument of the signalGramException - if an error occurs during cancelGSSExceptionpublic static void registerListener(GramJob job) throws GramException, GSSException
job - the jobGramException - if an error occurs during registrationGSSExceptionpublic static void registerListener(GramJob job, CallbackHandler handler) throws GramException, GSSException
GramExceptionGSSExceptionpublic static void unregisterListener(GramJob job) throws GramException, GSSException
job - the jobGramException - if an error occurs during unregisteringGSSExceptionpublic static void unregisterListener(GramJob job, CallbackHandler handler) throws GramException, GSSException
GramExceptionGSSExceptionpublic static void deactivateAllCallbackHandlers()
public static CallbackHandler deactivateCallbackHandler(GSSCredential cred)
cred - the credential of the callback handler.Copyright © 2013. All Rights Reserved.