|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jini.core.discovery.LookupLocator
A utility class that performs unicast discovery.
Field Summary | |
protected java.lang.String |
host
The name of the host at which to perform discovery. |
protected int |
port
The port number on the host at which to perform discovery. |
Constructor Summary | |
LookupLocator(java.lang.String url)
Construct a new LookupLocator object, set up to perform discovery to the given URL. |
|
LookupLocator(java.lang.String host,
int port)
Construct a new LookupLocator object, set to perform unicast discovery to the given host and port. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Two locators are equal if they have the same host and port. |
java.lang.String |
getHost()
Return the name of the host this LookupLocator object should contact. |
int |
getPort()
Return the number of the port to which this LookupLocator object should connect. |
ServiceRegistrar |
getRegistrar()
Perform unicast discovery and return the ServiceRegistrar object for the given lookup service. |
ServiceRegistrar |
getRegistrar(int timeout)
Perform unicast discovery and return the ServiceRegistrar object for the given lookup service. |
int |
hashCode()
|
java.lang.String |
toString()
Return the string form of this LookupLocator, as a jini-scheme URL. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected java.lang.String host
protected int port
Constructor Detail |
public LookupLocator(java.lang.String url) throws java.net.MalformedURLException
The URL in question must be of the form jini://host/ or jini://host:port/.
url
- the URL to usepublic LookupLocator(java.lang.String host, int port)
host
- the name of the host to contactport
- the number of the port to connect toMethod Detail |
public java.lang.String getHost()
public int getPort()
public ServiceRegistrar getRegistrar() throws java.io.IOException, java.lang.ClassNotFoundException
public ServiceRegistrar getRegistrar(int timeout) throws java.io.IOException, java.lang.ClassNotFoundException
If a connection can be established to start unicast discovery but the remote end fails to respond within the given time limit, an exception is thrown.
timeout
- the maximum time to wait for a response, in
millisecondspublic java.lang.String toString()
public boolean equals(java.lang.Object o)
public int hashCode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |