org.globus.wsrf.client
Class ServiceURL

java.lang.Object
  |
  +--org.globus.wsrf.client.ServiceURL

public class ServiceURL
extends Object


Field Summary
static String DEFAULT_SERVICE_CONTEXT
           
 
Constructor Summary
ServiceURL(String contactString)
          Construct a ServiceURL object from the specified contact string.
ServiceURL(String contactString, String serviceName)
           
 
Method Summary
static String getDefaultHost()
           
static int getDefaultPort()
           
static String getDefaultProtocol()
           
 String getFullServicePath()
           
 String getServiceName()
           
 URL getURL()
           
static URL getURL(String contactString, String serviceName)
          Utility method to get the full URL from a simplified contact string.
 void setServiceName(String serviceName)
          Specify the base name of the service, without the service context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SERVICE_CONTEXT

public static final String DEFAULT_SERVICE_CONTEXT
Constructor Detail

ServiceURL

public ServiceURL(String contactString)
Construct a ServiceURL object from the specified contact string. Grammar for a non-null contact String:

[protocol://]host[:[port]][/service context/service path]

If contactString is null then defaults will be used for protocol, host and port.

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.

ServiceURL

public ServiceURL(String contactString,
                  String serviceName)
Method Detail

getURL

public static URL getURL(String contactString,
                         String serviceName)
                  throws MalformedURLException
Utility method to get the full URL from a simplified contact string.
Parameters:
contactString - the simplified or complete contact string to infer the service URL from. See documentation of the constructor for the syntax of the contact string.
serviceName - the name of the service without the context
Throws:
MalformedURLException - if contact string is malformed as a URL even after prepending default protocol if missing.

getFullServicePath

public String getFullServicePath()

setServiceName

public void setServiceName(String serviceName)
Specify the base name of the service, without the service context. The service name is used to build the service path when it is not found in the URL contructed from the contact string.
Parameters:
serviceName - the name of the service (ex: core/admin/ContainerService)

getServiceName

public String getServiceName()

getURL

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

getDefaultProtocol

public static String getDefaultProtocol()

getDefaultHost

public static String getDefaultHost()

getDefaultPort

public static int getDefaultPort()


Copyright © 1999-2003 University of Chicago and The University of Southern California. All rights reserved.