|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uniba.wiai.lspi.chord.data.URL
public class URL
Address of nodes. Once created, a URL instance is unmodifiable.
Field Summary | |
---|---|
static java.util.List<java.lang.String> |
KNOWN_PROTOCOLS
The names of the protocols known to this chord implementation. |
static int |
LOCAL_PROTOCOL
Index of thread protocol (for local chord network ) in . |
static int |
RMI_PROTOCOL
Index of socket protocol in . |
static int |
SOCKET_PROTOCOL
Index of socket protocol in . |
Constructor Summary | |
---|---|
URL(java.lang.String urlString)
Create an instance of URL from urlString . |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Overwritten from Object . |
java.lang.String |
getHost()
Get the host name contained in this URL. |
java.lang.String |
getPath()
Get the path contained in this URL. |
int |
getPort()
Get the port contained in this URL. |
java.lang.String |
getProtocol()
Get the protocol of this URL. |
int |
hashCode()
Overwritten from Object . |
java.lang.String |
toString()
Overwritten from Object . |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.List<java.lang.String> KNOWN_PROTOCOLS
SOCKET_PROTOCOL
.
public static final int SOCKET_PROTOCOL
KNOWN_PROTOCOLS
.
public static final int LOCAL_PROTOCOL
KNOWN_PROTOCOLS
.
public static final int RMI_PROTOCOL
KNOWN_PROTOCOLS
.
Constructor Detail |
---|
public URL(java.lang.String urlString) throws java.net.MalformedURLException
urlString
.
urlString
- The string to create an URL from.
java.net.MalformedURLException
- This can occur if urlString
does not match the
pattern protocol://host[:port]/path
, an
unknown protocol is specified, or port is negative.Method Detail |
---|
public final java.lang.String getProtocol()
public final java.lang.String getHost()
public final java.lang.String getPath()
public final int getPort()
NO_PORT
if no port
has been specified for this URL.public final int hashCode()
Object
.
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object obj)
Object
.
equals
in class java.lang.Object
obj
-
true
if provided obj
is an instance
of URL
and has the same attributes as this
URL
.public final java.lang.String toString()
Object
.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |