org.globus.ogsa.client
Class ServiceURL

java.lang.Object
  extended byorg.globus.ogsa.client.ServiceURL

public class ServiceURL
extends java.lang.Object


Field Summary
static java.lang.String DEFAULT_PORT
           
static java.lang.String DEFAULT_PROTOCOL
           
static java.lang.String DEFAULT_SERVICE_CONTEXT
           
static java.lang.String OGSA_PROPERTIES_FILE
          File where default container port property is held.
static java.lang.String PORT_PROPERTY
          String key for default container port property.
static java.lang.String PROTOCOL_PROPERTY
           
 
Constructor Summary
ServiceURL(java.lang.String contactString)
          Grammar for a non-null contact String: [://][:[port]][/] If contactString is null then the local host will be used as .
 
Method Summary
 java.lang.String getServiceName()
           
static java.lang.String getServicePath(java.lang.String serviceName)
           
 java.net.URL getURL()
           
static java.net.URL getURL(java.lang.String contactString, java.lang.String serviceName)
          Utility method to get the full URL (i.e.
 void setServiceName(java.lang.String serviceName)
          Specify the name of the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT_PROPERTY

public static final java.lang.String PORT_PROPERTY
String key for default container port property.

See Also:
Constant Field Values

DEFAULT_PORT

public static final java.lang.String DEFAULT_PORT
See Also:
Constant Field Values

PROTOCOL_PROPERTY

public static final java.lang.String PROTOCOL_PROPERTY
See Also:
Constant Field Values

DEFAULT_PROTOCOL

public static final java.lang.String DEFAULT_PROTOCOL
See Also:
Constant Field Values

OGSA_PROPERTIES_FILE

public static final java.lang.String OGSA_PROPERTIES_FILE
File where default container port property is held.

See Also:
Constant Field Values

DEFAULT_SERVICE_CONTEXT

public static final java.lang.String DEFAULT_SERVICE_CONTEXT
See Also:
Constant Field Values
Constructor Detail

ServiceURL

public ServiceURL(java.lang.String contactString)
Grammar for a non-null contact String: [://][:[port]][/] If contactString is null then the local host will be used as . Note: if the service path is not specified in the contact string then the service name MUST be specified using the appropriate setter.

Parameters:
contactString - The contact string.
Method Detail

getServicePath

public static java.lang.String getServicePath(java.lang.String serviceName)

setServiceName

public void setServiceName(java.lang.String serviceName)
Specify the name of the service. Used to build the service path if no path is found in the URL contructed from the contact string.

Parameters:
serviceName - the name of the service (ex: core/admin/ContainerService)

getServiceName

public java.lang.String getServiceName()

getURL

public java.net.URL getURL()
                    throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException - if contact string is malformed as a URL even after prepending default protocol if missing.

getURL

public static java.net.URL getURL(java.lang.String contactString,
                                  java.lang.String serviceName)
                           throws java.net.MalformedURLException
Utility method to get the full URL (i.e. GSH) from a simplified contact string.

Throws:
java.net.MalformedURLException - if contact string is malformed as a URL even after prepending default protocol if missing.


Copyright ? 1999 University of Chicago and The University of Southern California. All Rights Reserved.