|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.griphyn.cPlanner.engine.Authenticate
public class Authenticate
It takes in a authenticate request and authenticates against the resource on the basis of the type of the resource against which authentication is required.
| Nested Class Summary | |
|---|---|
(package private) class |
Authenticate.HostPort
A convenience inner class that stores the host and the port associated with a server. |
| Field Summary | |
|---|---|
static int |
GRID_FTP_STANDARD_PORT
The standard port at which Grid FTP runs. |
private AuthenticateRequest |
mAuthRequest
The object containing the authenticate request. |
private GSSCredential |
mCredential
The credential to be used while authentication to jobmanager. |
private LogManager |
mLogger
The handle to the LogManager object. |
private PoolInfoProvider |
mPoolHandle
The handle to the Pool Info Provider. |
private PegasusProperties |
mProps
The handle to the PegasusProperties object. |
private int |
mTimeout
The timeout value that is to be used in milliseconds |
static int |
TIMEOUT_VALUE
The timeout in seconds. |
| Constructor Summary | |
|---|---|
Authenticate(PegasusProperties properties,
PoolInfoProvider poolHandle)
The overloaded constructor. |
|
| Method Summary | |
|---|---|
boolean |
authenticate(AuthenticateRequest ar)
Authenticates against a resource referred to in the authenticate request object. |
boolean |
authenticateJobManager(String contact)
It authenticates against the jobmanager specifyied. |
private String |
combine(String host,
int port)
A small helper method that returns the standard host and port combination to be used for logging purposes. |
private Authenticate.HostPort |
getHostPort(String urlPrefix)
Determines the hostname from the urlPrefix string in the pool file. |
boolean |
gridFTPAlive(String host,
int port)
It checks with a grid ftp server running at a particular host and port, to see if it is up or not. |
static void |
main(String[] args)
|
private boolean |
parseGridFTPResponse(String response,
char type)
The parses the grid ftp server response and returns if the response was valid or not. |
boolean |
removeResource(AuthenticateRequest ar)
It tries to remove a resource from the soft state of the pool. |
void |
setCredential(GSSCredential credential)
Sets the credential that has to be used for authentication. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int GRID_FTP_STANDARD_PORT
public static final int TIMEOUT_VALUE
private int mTimeout
private AuthenticateRequest mAuthRequest
private PoolInfoProvider mPoolHandle
private LogManager mLogger
private PegasusProperties mProps
private GSSCredential mCredential
| Constructor Detail |
|---|
public Authenticate(PegasusProperties properties,
PoolInfoProvider poolHandle)
properties - the PegasusProperties to be used.| Method Detail |
|---|
public void setCredential(GSSCredential credential)
credential - the credential to be set.public boolean authenticate(AuthenticateRequest ar)
public boolean removeResource(AuthenticateRequest ar)
ar - the AuthenticateRequest containing the resource info
public boolean authenticateJobManager(String contact)
contact - the jobmanager contact.
public boolean gridFTPAlive(String host,
int port)
host - the host at which the gridftp server is running .port - the port at which server is running on the host.
private boolean parseGridFTPResponse(String response,
char type)
response - the response got from the grid ftp server.type - c response when first connected to server.
q response when sent the quit command.
private String combine(String host,
int port)
host - the host.port - the port.
private Authenticate.HostPort getHostPort(String urlPrefix)
urlPrefix - the protocol, hostname and port combination.
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||