org.globus.myproxy
Class Params

java.lang.Object
  extended byorg.globus.myproxy.Params
All Implemented Interfaces:
MyProxyConstants
Direct Known Subclasses:
ChangePasswordParams, DestroyParams, GetParams, InfoParams, InitParams

public abstract class Params
extends Object
implements MyProxyConstants

A generic class for representing basic parameters needed for all MyProxy operations.


Field Summary
protected  int lifetime
           
protected  String passphrase
           
protected  String username
           
 
Fields inherited from interface org.globus.myproxy.MyProxyConstants
COMMAND, CRED_DESC, CRED_NAME, CRLF, LIFETIME, MIN_PASSWORD_LENGTH, MYPROXY_PROTOCOL_VERSION, NEW_PHRASE, PASSPHRASE, RENEWER, RETRIEVER, USERNAME, VERSION
 
Constructor Summary
Params(int command)
           
Params(int command, String username, String passphrase)
           
 
Method Summary
protected  void add(StringBuffer buf, String prefix, String value)
           
protected  void checkPassphrase(String passphrase)
           
 int getLifetime()
           
 String getPassphrase()
           
 String getUserName()
           
 String makeRequest()
           
protected  String makeRequest(boolean includePassword)
          Serializes the parameters into a MyProxy request.
protected  void setCommand(int command)
           
 void setLifetime(int seconds)
           
 void setPassphrase(String passphrase)
           
 void setUserName(String username)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

username

protected String username

passphrase

protected String passphrase

lifetime

protected int lifetime
Constructor Detail

Params

public Params(int command)

Params

public Params(int command,
              String username,
              String passphrase)
Method Detail

setCommand

protected void setCommand(int command)

setUserName

public void setUserName(String username)

getUserName

public String getUserName()

setPassphrase

public void setPassphrase(String passphrase)

getPassphrase

public String getPassphrase()

setLifetime

public void setLifetime(int seconds)

getLifetime

public int getLifetime()

checkPassphrase

protected void checkPassphrase(String passphrase)

makeRequest

public String makeRequest()

makeRequest

protected String makeRequest(boolean includePassword)
Serializes the parameters into a MyProxy request. Subclasses should overwrite this function and append the custom parameters to the output of this function.


add

protected void add(StringBuffer buf,
                   String prefix,
                   String value)

toString

public String toString()