blob: 2273ce31b5f9cf88a0ea78e656182600e5c9a423 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0) on Sun Aug 28 20:42:03 EST 2016 -->
<title>LookupDiscoveryService (Apache River v3.0.0 API Documentation (internals))</title>
<meta name="date" content="2016-08-28">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="LookupDiscoveryService (Apache River v3.0.0 API Documentation (internals))";
}
}
catch(err) {
}
//-->
var methods = {"i0":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LookupDiscoveryService.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../net/jini/discovery/LookupDiscoveryRegistration.html" title="interface in net.jini.discovery"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../net/jini/discovery/LookupLocatorDiscovery.html" title="class in net.jini.discovery"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?net/jini/discovery/LookupDiscoveryService.html" target="_top">Frames</a></li>
<li><a href="LookupDiscoveryService.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">net.jini.discovery</div>
<h2 title="Interface LookupDiscoveryService" class="title">Interface LookupDiscoveryService</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../org/apache/river/fiddler/FiddlerProxy.html" title="class in org.apache.river.fiddler">FiddlerProxy</a>, <a href="../../../org/apache/river/fiddler/FiddlerProxy.ConstrainableFiddlerProxy.html" title="class in org.apache.river.fiddler">FiddlerProxy.ConstrainableFiddlerProxy</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">LookupDiscoveryService</span></pre>
<div class="block">Defines the interface to the lookup discovery service. This interface is
not a remote interface; each implementation of this service exports
proxy objects that implement the LookupDiscoveryService interface local to
the client, using an implementation-specific protocol to communicate
with the actual remote server. All of the proxy methods obey normal
RMI remote interface semantics except where explicitly noted. Two
proxy objects are equal if they are proxies for the same lookup discovery
service.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Sun Microsystems, Inc.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../net/jini/discovery/LookupDiscoveryRegistration.html" title="interface in net.jini.discovery"><code>LookupDiscoveryRegistration</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../net/jini/discovery/LookupDiscoveryRegistration.html" title="interface in net.jini.discovery">LookupDiscoveryRegistration</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/discovery/LookupDiscoveryService.html#register-java.lang.String:A-net.jini.core.discovery.LookupLocator:A-net.jini.core.event.RemoteEventListener-java.rmi.MarshalledObject-long-">register</a></span>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;groups,
<a href="../../../net/jini/core/discovery/LookupLocator.html" title="class in net.jini.core.discovery">LookupLocator</a>[]&nbsp;locators,
<a href="../../../net/jini/core/event/RemoteEventListener.html" title="interface in net.jini.core.event">RemoteEventListener</a>&nbsp;listener,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/MarshalledObject.html?is-external=true" title="class or interface in java.rmi">MarshalledObject</a>&nbsp;handback,
long&nbsp;leaseDuration)</code>
<div class="block">Register with the lookup discovery service.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="register-java.lang.String:A-net.jini.core.discovery.LookupLocator:A-net.jini.core.event.RemoteEventListener-java.rmi.MarshalledObject-long-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>register</h4>
<pre><a href="../../../net/jini/discovery/LookupDiscoveryRegistration.html" title="interface in net.jini.discovery">LookupDiscoveryRegistration</a>&nbsp;register(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;groups,
<a href="../../../net/jini/core/discovery/LookupLocator.html" title="class in net.jini.core.discovery">LookupLocator</a>[]&nbsp;locators,
<a href="../../../net/jini/core/event/RemoteEventListener.html" title="interface in net.jini.core.event">RemoteEventListener</a>&nbsp;listener,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/MarshalledObject.html?is-external=true" title="class or interface in java.rmi">MarshalledObject</a>&nbsp;handback,
long&nbsp;leaseDuration)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></pre>
<div class="block">Register with the lookup discovery service. When a client invokes
this method, it requests that the lookup discovery service perform
discovery processing on its behalf.
<p>
An invocation of this method produces an object - referred to as a
registration object (or simply, a registration) - that is mutable.
Because the registration produced by this method is mutable, each
invocation of this method produces a new registration object. Thus,
this method is not idempotent.
<p>
To register with the lookup discovery service, the client must
indicate the lookup services it is interested in discovering. It
does this by submitting two sets of of objects. One set consists
of the names of the groups whose members are lookup services the
client wishes to be discovered. The other set consists of
LookupLocator objects, each corresponding to a specific lookup
service the client wishes to be discovered. The state information
managed by the lookup discovery service contains no knowledge of
the clients that register. Thus, there is no requirement that the
client identify itself during the registration process.
<p>
Registration with the lookup discovery service includes registration
with the event mechanism of the lookup discovery service. That is,
for each registration created as a result of an invocation of this
method, an event identifier will be generated that uniquely maps
the registration to the listener object and to the set of groups
and locators input to this method. This event identifier is returned
as a part of the registration object, and is unique across all
other active registrations with the lookup discovery service.
<p>
While the registration is in effect, whenever the lookup discovery
service finds a lookup service matching the discovery criteria of
one or more of its registrations, an instance of
net.jini.discovery.RemoteDiscoveryEvent will be sent to the
listener corresponding to each such registration. The event sent
to each listener will contain the appropriate event identifier.
<p>
Any registration granted as a result of an invocation of this method
is leased. The initial duration of the lease granted to a client
by the lookup discovery service will be less than or equal to the
requested duration input to this method. Any registration with the
lookup discovery service is persistent across restarts (crashes)
of the lookup discovery service until the lease on the registration
expires or is cancelled.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>groups</code> - String array, none of whose elements may be null,
consisting of zero or more names of groups to
which lookup services to discover belong.
A value of null
(net.jini.discovery.LookupDiscovery.ALL_GROUPS)
is acceptable. If null is passed to this argument,
the lookup discovery service will attempt to
discover all lookup services located within the
multicast radius of the host on which the lookup
discovery service is running. If an empty array
(net.jini.discovery.LookupDiscovery.NO_GROUPS)
is passed to this argument, then no group discovery
will be performed for the associated registration
until the client, through one of the registration's
methods, populates the managed set of groups.</dd>
<dd><code>locators</code> - array of zero or more non-null LookupLocator
objects, each corresponding to a specific lookup
service to discover. If either the empty array
or null is passed to this argument, then no
locator discovery will be performed for the
associated registration until the client, through
one of the registration's methods, populates the
managed set of locators.</dd>
<dd><code>listener</code> - a non-null instance of RemoteEventListener. This
argument specifies the entity that will receive
events notifying the registration that a lookup
service of interest has been discovered. A
non-null value must be passed to this argument,
otherwise a NullPointerException will be thrown
and the registration will not succeed.</dd>
<dd><code>handback</code> - null or an instance of MarshalledObject. This
argument specifies an object that will be
included in the notification event that the
lookup discovery service sends to the registered
listener.</dd>
<dd><code>leaseDuration</code> - long value representing the amount of time (in
milliseconds) for which the resources of the
lookup discovery service are being requested.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an instance of the LookupDiscoveryRegistration interface.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></code> - typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
registration may or may not have completed successfully.</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - this exception occurs when
null is input to the <code>listener</code> parameter, as well
as when one or more of the elements of the <code>groups</code>
parameter is null.</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - this exception occurs when
the value input to the <code>leaseDuration</code> parameter
is neither positive, Lease.FOREVER, nor Lease.ANY.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LookupDiscoveryService.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../net/jini/discovery/LookupDiscoveryRegistration.html" title="interface in net.jini.discovery"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../net/jini/discovery/LookupLocatorDiscovery.html" title="class in net.jini.discovery"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?net/jini/discovery/LookupDiscoveryService.html" target="_top">Frames</a></li>
<li><a href="LookupDiscoveryService.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright 2007-2013, multiple authors.<br>Licensed under the <a href=http://www.apache.org/licenses/LICENSE-2.0 target=child >Apache License, Version 2.0</a>, see the <a href=../../../doc-files/NOTICE target=child >NOTICE</a> file for attributions.</small></p>
</body>
</html>