|
|||||||||
| 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 List<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(String urlString)
Create an instance of URL from urlString. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Overwritten from Object. |
String |
getHost()
Get the host name contained in this URL. |
String |
getPath()
Get the path contained in this URL. |
int |
getPort()
Get the port contained in this URL. |
String |
getProtocol()
Get the protocol of this URL. |
int |
hashCode()
Overwritten from Object. |
String |
toString()
Overwritten from Object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final List<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(String urlString)
throws MalformedURLException
urlString.
urlString - The string to create an URL from.
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 String getProtocol()
public final String getHost()
public final 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 Objectpublic final boolean equals(Object obj)
Object.
equals in class Objectobj -
true if provided obj is an instance
of URL and has the same attributes as this
URL.public final String toString()
Object.
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||