Class horb.orb.HorbURL
All Packages Class Hierarchy This Package Previous Next Index
Class horb.orb.HorbURL
java.lang.Object
|
+----horb.orb.HorbURL
- public class HorbURL
- extends Object
URL (Universal Resource Locator) for HORB. HorbURL is used to represent a HORB object.
-
host
-
-
objectID
-
-
port
-
-
protocol
-
-
ref
-
-
HorbURL()
- This constructor creates default URL.
-
HorbURL(HorbURL)
- create a new URL from existing URL.
-
HorbURL(HorbURL, String)
- create a new URL from existing URL and an objectID.
-
HorbURL(String)
- Create an URL for an existing or an unexisting HORB object.
-
HorbURL(String, int, String)
- Create an URL for an existing or an unexisting HORB object.
-
HorbURL(String, String)
- Create an URL for an existing or an unexisting HORB object.
-
equals(HorbURL)
- Returns true if two URLs are equal.
-
getHost()
- Returns HostName.
-
getObjectID()
- Return objectID.
-
getPort()
- Returns PortNo.
-
getProtocol()
- Returns Protcol.
-
getProtocol(String)
- Set Protcol name.
-
getRef()
- Return ref.
-
getURL()
- Returns string representation of this URL.
-
setHost(String)
- Set HostName.
-
setObjectID(String)
- Set objectID.
-
setPort(int)
- set PortNo.
-
setRef(String)
- Set ref.
-
setURL(String)
- parse and set URL.
Note that url should include "protocol://" in it,
for example "file:///dir/file".
-
toString()
- Returns string representation of this URL.
protocol
protected String protocol
host
protected String host
objectID
protected String objectID
ref
protected String ref
port
protected int port
HorbURL
public HorbURL()
- This constructor creates default URL. That is "horb://localhost/".
HorbURL
public HorbURL(String host,
int port,
String objectID)
- Create an URL for an existing or an unexisting HORB object.
- Parameters:
- host - host name of the remote object. If null or "" or "-", localhost is assumed.
- port - TCP/IP port number at the remote host.
- objectID - objectID of the remote object. This can be null
when creates a new remote object. ref can be appended,
for example object#ref1.
HorbURL
public HorbURL(String host,
String objectID)
- Create an URL for an existing or an unexisting HORB object.
Default port number is used.
- Parameters:
- host - host name of the remote object. If null or "" or "-", localhost is assumed.
- objectID - objectID of the remote object. This can be null
when creates a new remote object. ref can be appended,
for example object#ref1.
HorbURL
public HorbURL(String url) throws HORBException
- Create an URL for an existing or an unexisting HORB object.
Note that url should include "protocol://" in it,
for example "file:///dir/file". "file:/dir/file" is not allowed.
URL syntax:
://[[:]] [/] [ [#[]]
]
If is '-' or omitted, localhost is assumed.
If is omitted, default port number is assumed.
If is omitted, HORB assumes the user wants to create a new instance. getObjectID() returns null.
Examples:
horb://www.etl.go.jp:8887/directory
horb://www.etl.go.jp/directory
horb://www.etl.go.jp/
horb://-/directory
horb://-/
default values are;
protocol = "horb"
host = "localhost"
port = 0
objectID = null
ref = null
- Parameters:
- url - URL of the object.
HorbURL
public HorbURL(HorbURL url)
- create a new URL from existing URL.
- Parameters:
- url - a HORB url. hostname and portNo are used.
HorbURL
public HorbURL(HorbURL url,
String objectID)
- create a new URL from existing URL and an objectID.
- Parameters:
- url - a HORB url. hostname and portNo are used.
- objectID - objectID for this URL. ref can be appended,
for example object#ref1.
equals
public boolean equals(HorbURL url)
- Returns true if two URLs are equal.
- Parameters:
- url - a HORB url.
getProtocol
public final String getProtocol()
- Returns Protcol.
getProtocol
public final void getProtocol(String protocol)
- Set Protcol name.
- Parameters:
- protocol - protocol name to set.
getHost
public final String getHost()
- Returns HostName.
setHost
public final void setHost(String host)
- Set HostName.
- Parameters:
- host - hostname
getObjectID
public final String getObjectID()
- Return objectID.
setObjectID
public final void setObjectID(String objectID)
- Set objectID.
- Parameters:
- objectID - objectID to set.
getRef
public final String getRef()
- Return ref.
setRef
public final void setRef(String ref)
- Set ref.
- Parameters:
- ref - ref to set.
getPort
public final int getPort()
- Returns PortNo.
setPort
public final void setPort(int port)
- set PortNo.
getURL
public final String getURL()
- Returns string representation of this URL. This is equivalent to toString().
toString
public String toString()
- Returns string representation of this URL.
- Overrides:
- toString in class Object
setURL
public void setURL(String url) throws HORBException
- parse and set URL.
Note that url should include "protocol://" in it,
for example "file:///dir/file". "file:/dir/file" is not allowed.
default values are;
protocol = "horb"
host = "localhost"
port = 0
objectID = null
ref = null
- Parameters:
- url - URL to set.
All Packages Class Hierarchy This Package Previous Next Index