|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.livetribe.slp.ServiceURL
public class ServiceURL
A ServiceURL represents the location of a service.
A client given a ServiceURL should be able to contact the remote service that the ServiceURL
represents with the information carried by the ServiceURL itself.
A ServiceURL is a URI that defines at least scheme and address portion, and that may have the
service:
scheme.
ServiceURLs have a lifetime, used to denote the period of time over which the service is
available.
ServiceType
,
Serialized FormField Summary | |
---|---|
static int |
LIFETIME_DEFAULT
The constant used to denote the default lifetime of service URLs (3 hours). |
static int |
LIFETIME_MAXIMUM
The constant used to denote the maximum value for the lifetime of service URLs. |
static int |
LIFETIME_NONE
The constant used to denote that this service URL has no lifetime. |
static int |
LIFETIME_PERMANENT
The constant used to denote that this service URL has an infinite lifetime. |
static int |
NO_PORT
The constant used to denote that the service did not specify a port. |
Constructor Summary | |
---|---|
ServiceURL(String url)
Creates a ServiceURL parsing the given string, with a default lifetime . |
|
ServiceURL(String url,
int lifetime)
Creates a ServiceURL parsing the given string, with the specified lifetime, in seconds. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getHost()
Returns the host portion of this service URL. |
int |
getLifetime()
Returns the lifetime, in seconds, of this service URL. |
int |
getPort()
Returns the port number of this service URL. |
ServiceType |
getServiceType()
Returns the ServiceType of this service URL. |
String |
getTransport()
Returns the network layer transport identifier, which is the empty string for the IP transport. |
String |
getURL()
Returns the string form of this service URL, that can be passed to ServiceURL(String) to be parsed. |
String |
getURLPath()
Returns the path of this service URL. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NO_PORT
public static final int LIFETIME_NONE
public static final int LIFETIME_DEFAULT
public static final int LIFETIME_MAXIMUM
public static final int LIFETIME_PERMANENT
Constructor Detail |
---|
public ServiceURL(String url)
ServiceURL
parsing the given string, with a default lifetime
.
url
- The string to be parsedpublic ServiceURL(String url, int lifetime)
ServiceURL
parsing the given string, with the specified lifetime, in seconds.
url
- The string to be parsedlifetime
- The lifetime, in seconds, for this service URLMethod Detail |
---|
public ServiceType getServiceType()
ServiceType
of this service URL.
public String getTransport()
public String getHost()
public int getPort()
NO_PORT
public String getURLPath()
public int getLifetime()
public String getURL()
ServiceURL(String)
to be parsed.
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
getURL()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |