|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
org.globus.util
Class GlobusURL
java.lang.Object | +--org.globus.util.GlobusURL
- public class GlobusURL
- extends java.lang.Object
This class represents the URLs needed by various Globus services, including:
- GASS
- GRAM
- FTP
- GSIFTP
| Field Summary | |
protected java.lang.String |
host
|
protected int |
port
|
protected java.lang.String |
protocol
|
protected java.lang.String |
pwd
|
protected java.lang.String |
url
|
protected java.lang.String |
urlPath
|
protected java.lang.String |
user
|
| Constructor Summary | |
GlobusURL(java.lang.String url)
Parses the url and extracts the url parts. |
|
GlobusURL(java.net.URL url)
Creates a GlobusURL instance from URL instance. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Compares two urls. |
java.lang.String |
getFile()
Deprecated. |
java.lang.String |
getHost()
Returns the host name of an url. |
java.lang.String |
getPath()
Returns the url path part of an url. |
int |
getPort()
Returns the port number of an url. |
static int |
getPort(java.lang.String protocol)
|
java.lang.String |
getProtocol()
Returns the protocol of an url. |
java.lang.String |
getPwd()
Returns the password of an url. |
java.lang.String |
getURL()
Returns the string representation of an url. |
java.lang.String |
getUrlPath()
Deprecated. Though this class does not extend java.net.URL, it should be similar where possible to be intuitive to the user used to URL. |
java.lang.String |
getUser()
Returns the user name of an url. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protocol
protected java.lang.String protocol
host
protected java.lang.String host
urlPath
protected java.lang.String urlPath
user
protected java.lang.String user
pwd
protected java.lang.String pwd
url
protected java.lang.String url
port
protected int port
| Constructor Detail |
GlobusURL
public GlobusURL(java.lang.String url)
throws java.net.MalformedURLException
- Parses the url and extracts the url parts.
- Parameters:
url- the url to parse.- Throws:
- if the url is malformed.MalformedURLExceptionjava.net.MalformedURLException
GlobusURL
public GlobusURL(java.net.URL url)
- Creates a GlobusURL instance from URL instance.
Note: Not all the url parts are copied.
| Method Detail |
getPort
public static int getPort(java.lang.String protocol)
getURL
public java.lang.String getURL()
- Returns the string representation of
an url.
- Returns:
- the url as string.
getProtocol
public java.lang.String getProtocol()
- Returns the protocol of an url.
- Returns:
- the protocol part of the url.
getHost
public java.lang.String getHost()
- Returns the host name of an url.
- Returns:
- the host name part of the url.
getPort
public int getPort()
- Returns the port number of an url.
- Returns:
- the port name of the url. -1 if the port was not specified.
getPath
public java.lang.String getPath()
- Returns the url path part of an url.
- Returns:
- the url path part of the url. Returns null if the url path is not specified.
getFile
public java.lang.String getFile()
- Deprecated.
- Returns the url path part of an url.
- Returns:
- the url path part of the url. Returns null if the url path is not specified.
- Returns the url path part of an url.
getUrlPath
public java.lang.String getUrlPath()
- Deprecated. Though this class does not extend java.net.URL,
it should be similar where possible to be intuitive
to the user used to URL.
- Returns the url path part of an url.
- Returns:
- the url path part of the url. Returns null if the url path is not specified.
- Returns the url path part of an url.
getUser
public java.lang.String getUser()
- Returns the user name of an url.
- Returns:
- the user name if present in the url, otherwise returns null.
getPwd
public java.lang.String getPwd()
- Returns the password of an url.
- Returns:
- the password if present in the url, otherwise returns null.
equals
public boolean equals(java.lang.Object obj)
- Compares two urls.
- Overrides:
equalsin classjava.lang.Object
- Parameters:
obj- could be a string representation of an url or an instance of this class.- Returns:
- true if the urls are the same, false otherwise.
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||