gov.lbl.srm.client.wsdl
Class SRMServer

java.lang.Object
  extended by gov.lbl.srm.client.wsdl.SRMServer

public class SRMServer
extends java.lang.Object

GSI-based connection is established and ping the BeStMan for version info and its state info. This may happen only once when the web portal starts up. SRMServer class is responsible for establishing and maintaining connections with the SRM Server.


Constructor Summary
SRMServer(java.lang.String log4jlocation, java.lang.String logPath, boolean debug)
          constructor
SRMServer(java.lang.String proxyFile, java.lang.String logPath, java.lang.String log4jlocation, boolean debug)
          constructor
 
Method Summary
 boolean connect(java.lang.String serverUrl)
          connects to the SRM server, the service path provided in the serverUrl it creates an SRM server object.
 void disconnect()
          disconnect from the connected SRM server
 java.lang.String findInfo(java.lang.String key)
          For the given key, it returns the matching value from the extra info provided by the SRM Server
 org.ietf.jgss.GSSCredential getCredential()
           
 boolean getDebug()
           
 java.lang.String getEndPoint()
           
 ISRM getISRM()
           
 java.lang.String getLog4jLocation()
           
 java.util.logging.Logger getLogger()
           
 boolean getSilent()
           
 java.lang.String getStatus()
          Returns SRM_SUCCESS when the ping command is successful.
 Stub getStub()
           
 java.lang.String getVersionInfo()
          Returns the version Information of the SRM Server
 boolean ping(java.lang.String uid)
          Check the status of the SRM server.
 void printInfo()
          prints the information from the map returned by the ping call
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SRMServer

public SRMServer(java.lang.String log4jlocation,
                 java.lang.String logPath,
                 boolean debug)
          throws SRMClientException
constructor

Parameters:
log4jlocation - Location where the log4j.properties exists
logPath - path where log files can go. when logpath is providedthe output from the console will go into the logfiles
debug - true or false
Throws:
SRMClientException

SRMServer

public SRMServer(java.lang.String proxyFile,
                 java.lang.String logPath,
                 java.lang.String log4jlocation,
                 boolean debug)
          throws SRMClientException
constructor

Parameters:
proxyFile - Location where proxy file exists
log4jlocation - Location where the log4j.properties exists
logPath - path where log files can go. when logpath is providedthe output from the console will go into the logfiles
debug - true or false
Throws:
SRMClientException
Method Detail

getDebug

public boolean getDebug()

getSilent

public boolean getSilent()

connect

public boolean connect(java.lang.String serverUrl)
                throws SRMClientException,
                       java.lang.Exception
connects to the SRM server, the service path provided in the serverUrl it creates an SRM server object.

Parameters:
serverUrl - -- the serverUrl for the SRM server to be connected
Returns:
boolean -- upon successful connection it returns true else false
Throws:
SRMClientException
java.lang.Exception

disconnect

public void disconnect()
disconnect from the connected SRM server


getEndPoint

public java.lang.String getEndPoint()

getStub

public Stub getStub()

getISRM

public ISRM getISRM()

getCredential

public org.ietf.jgss.GSSCredential getCredential()

getLogger

public java.util.logging.Logger getLogger()

getLog4jLocation

public java.lang.String getLog4jLocation()

ping

public boolean ping(java.lang.String uid)
             throws SRMClientException,
                    java.lang.Exception
Check the status of the SRM server. Returns SRM server version info and other info

Parameters:
uid - Authorization Id
Returns:
boolean returns true after successful ping, else it returns false
Throws:
SRMClientException
java.lang.Exception

getVersionInfo

public java.lang.String getVersionInfo()
Returns the version Information of the SRM Server

Returns:
String Verson information of the SRM server

getStatus

public java.lang.String getStatus()
Returns SRM_SUCCESS when the ping command is successful. Otherwise returns SRM_FAILURE

Returns:
String SRM_SUCCESS when successfull else SRM_FAILURE
See Also:
String

findInfo

public java.lang.String findInfo(java.lang.String key)
                          throws SRMClientException
For the given key, it returns the matching value from the extra info provided by the SRM Server

Parameters:
key - key for the extra info
Returns:
String returns the value for the key provided
Throws:
SRMClientException
See Also:
String

printInfo

public void printInfo()
prints the information from the map returned by the ping call