|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.jini.core.discovery.LookupLocator
A utility class that performs unicast discovery.
| Field Summary | |
protected 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(String url)
Construct a new LookupLocator object, set up to perform discovery to the given URL. |
|
LookupLocator(String host,
int port)
Construct a new LookupLocator object, set to perform unicast discovery to the given host and port. |
|
| Method Summary | |
boolean |
equals(Object o)
Two locators are equal if they have the same host and port. |
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()
|
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 String host
protected int port
| Constructor Detail |
public LookupLocator(String url)
throws MalformedURLException
The URL in question must be of the form jini://host/ or jini://host:port/.
url - the URL to use
MalformedURLException - the URL passed in could not be
parsed
public LookupLocator(String host,
int port)
host - the name of the host to contactport - the number of the port to connect to| Method Detail |
public String getHost()
public int getPort()
public ServiceRegistrar getRegistrar()
throws IOException,
ClassNotFoundException
IOException - an error occurred during discovery
ClassNotFoundException - some discovery-related
classes could not be found
public ServiceRegistrar getRegistrar(int timeout)
throws IOException,
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
milliseconds
IOException - an error occurred during discovery
ClassNotFoundException - some discovery-related
classes could not be foundpublic String toString()
public boolean equals(Object o)
public int hashCode()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||