blob: 2e0c89db63916a3f0cf4008a09651f8bc314a729 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (14.0.1) on Tue Jun 15 21:55:05 PDT 2021 -->
<title>EndpointListener (Eclipse Communication Framework (ECF) 3.14.22 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="dc.created" content="2021-06-15">
<meta name="description" content="declaration: package: org.osgi.service.remoteserviceadmin, interface: EndpointListener">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.js"></script>
</head>
<body class="class-declaration">
<script type="text/javascript">var data = {"i0":38,"i1":38};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flexBox">
<header role="banner" class="flexHeader">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/EndpointListener.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-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<div class="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="skipNav"><a id="skip.navbar.top">
<!-- -->
</a></div>
</nav>
</header>
<div class="flexContent">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.osgi.service.remoteserviceadmin</a></div>
<h1 title="Interface EndpointListener" class="title">Interface EndpointListener</h1>
</div>
<div class="contentContainer">
<section class="description">
<hr>
<pre>@ConsumerType
public interface <span class="typeNameLabel">EndpointListener</span></pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">As of 1.1. Replaced by EndpointEventListener.</div>
</div>
<div class="block">Deprecated white board service that represents a listener for endpoints.
An Endpoint Listener represents a participant in the distributed model that
is interested in Endpoint Descriptions.
The Endpoint Listener is called back when matching endpoints are added or
removed. Consumers interested in the modification of endpoints, when
associated service properties are changed, should use an
<a href="EndpointEventListener.html" title="interface in org.osgi.service.remoteserviceadmin"><code>EndpointEventListener</code></a> instead.
This white board service can be used in many different scenarios. However,
the primary use case is to allow a remote manager to be informed of Endpoint
Descriptions available in the network and inform the network about available
Endpoint Descriptions.
Both the network bundle and the manager bundle register an Endpoint Listener
service. The manager informs the network bundle about Endpoints that it
creates. The network bundles then uses a protocol like SLP to announce these
local end-points to the network.
If the network bundle discovers a new Endpoint through its discovery
protocol, then it sends an Endpoint Description to all the Endpoint Listener
services that are registered (except its own) that have specified an interest
in that endpoint.
Endpoint Listener services can express their <i>scope</i> with the service
property <a href="#ENDPOINT_LISTENER_SCOPE"><code>ENDPOINT_LISTENER_SCOPE</code></a>. This service property is a list of
filters. An Endpoint Description should only be given to a Endpoint Listener
when there is at least one filter that matches the Endpoint Description
properties.
This filter model is quite flexible. For example, a discovery bundle is only
interested in locally originating Endpoint Descriptions. The following filter
ensure that it only sees local endpoints.
<pre>
(org.osgi.framework.uuid=72dc5fd9-5f8f-4f8f-9821-9ebb433a5b72)
</pre>
In the same vein, a manager that is only interested in remote Endpoint
Descriptions can use a filter like:
<pre>
(!(org.osgi.framework.uuid=72dc5fd9-5f8f-4f8f-9821-9ebb433a5b72))
</pre>
Where in both cases, the given UUID is the UUID of the local framework that
can be found in the Framework properties.
The Endpoint Listener's scope maps very well to the service hooks. A manager
can just register all filters found from the Listener Hook as its scope. This
will automatically provide it with all known endpoints that match the given
scope, without having to inspect the filter string.
In general, when an Endpoint Description is discovered, it should be
dispatched to all registered Endpoint Listener services. If a new Endpoint
Listener is registered, it should be informed about all currently known
Endpoints that match its scope. If a getter of the Endpoint Listener service
is unregistered, then all its registered Endpoint Description objects must be
removed.
The Endpoint Listener models a <i>best effort</i> approach. Participating
bundles should do their utmost to keep the listeners up to date, but
implementers should realize that many endpoints come through unreliable
discovery processes.</div>
</section>
<section class="summary">
<ul class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<li class="blockList">
<section class="fieldSummary"><a id="field.summary">
<!-- -->
</a>
<h2>Field Summary</h2>
<div class="memberSummary">
<table>
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<thead>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ENDPOINT_LISTENER_SCOPE">ENDPOINT_LISTENER_SCOPE</a></span></code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
<div class="block">Specifies the interest of this listener with filters.</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li class="blockList">
<section class="methodSummary"><a id="method.summary">
<!-- -->
</a>
<h2>Method Summary</h2>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="tableTab" onclick="show(4);">Abstract Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t6" class="tableTab" onclick="show(32);">Deprecated Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<thead>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#endpointAdded(org.osgi.service.remoteserviceadmin.EndpointDescription,java.lang.String)">endpointAdded</a></span>&#8203;(<a href="EndpointDescription.html" title="class in org.osgi.service.remoteserviceadmin">EndpointDescription</a>&nbsp;endpoint,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;matchedFilter)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
<div class="block">Register an endpoint with this listener.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#endpointRemoved(org.osgi.service.remoteserviceadmin.EndpointDescription,java.lang.String)">endpointRemoved</a></span>&#8203;(<a href="EndpointDescription.html" title="class in org.osgi.service.remoteserviceadmin">EndpointDescription</a>&nbsp;endpoint,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;matchedFilter)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span></div>
<div class="block">Remove the registration of an endpoint.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<li class="blockList">
<section class="fieldDetails"><a id="field.detail">
<!-- -->
</a>
<h2>Field Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="ENDPOINT_LISTENER_SCOPE">ENDPOINT_LISTENER_SCOPE</a></h3>
<div class="memberSignature"><span class="modifiers">static final</span>&nbsp;<span class="returnType"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></span>&nbsp;<span class="memberName">ENDPOINT_LISTENER_SCOPE</span></div>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<div class="block">Specifies the interest of this listener with filters. This listener is
only interested in Endpoint Descriptions where its properties match the
given filter. The type of this property must be <code>String+</code>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.osgi.service.remoteserviceadmin.EndpointListener.ENDPOINT_LISTENER_SCOPE">Constant Field Values</a></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li class="blockList">
<section class="methodDetails"><a id="method.detail">
<!-- -->
</a>
<h2>Method Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="endpointAdded(org.osgi.service.remoteserviceadmin.EndpointDescription,java.lang.String)">endpointAdded</a></h3>
<div class="memberSignature"><span class="returnType">void</span>&nbsp;<span class="memberName">endpointAdded</span>&#8203;(<span class="arguments"><a href="EndpointDescription.html" title="class in org.osgi.service.remoteserviceadmin">EndpointDescription</a>&nbsp;endpoint,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;matchedFilter)</span></div>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<div class="block">Register an endpoint with this listener.
If the endpoint matches one of the filters registered with the
<a href="#ENDPOINT_LISTENER_SCOPE"><code>ENDPOINT_LISTENER_SCOPE</code></a> service property then this filter should
be given as the <code>matchedFilter</code> parameter.
When this service is first registered or it is modified, it should
receive all known endpoints matching the filter.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>endpoint</code> - The Endpoint Description to be published</dd>
<dd><code>matchedFilter</code> - The filter from the <a href="#ENDPOINT_LISTENER_SCOPE"><code>ENDPOINT_LISTENER_SCOPE</code></a>
that matched the endpoint, must not be <code>null</code>.</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="endpointRemoved(org.osgi.service.remoteserviceadmin.EndpointDescription,java.lang.String)">endpointRemoved</a></h3>
<div class="memberSignature"><span class="returnType">void</span>&nbsp;<span class="memberName">endpointRemoved</span>&#8203;(<span class="arguments"><a href="EndpointDescription.html" title="class in org.osgi.service.remoteserviceadmin">EndpointDescription</a>&nbsp;endpoint,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;matchedFilter)</span></div>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div>
<div class="block">Remove the registration of an endpoint.
If an endpoint that was registered with the
<a href="#endpointAdded(org.osgi.service.remoteserviceadmin.EndpointDescription,java.lang.String)"><code>endpointAdded(EndpointDescription, String)</code></a> method is no longer
available then this method should be called. This will remove the
endpoint from the listener.
It is not necessary to remove endpoints when the service is unregistered
or modified in such a way that not all endpoints match the interest
filter anymore.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>endpoint</code> - The Endpoint Description that is no longer valid.</dd>
<dd><code>matchedFilter</code> - The filter from the <a href="#ENDPOINT_LISTENER_SCOPE"><code>ENDPOINT_LISTENER_SCOPE</code></a>
that matched the endpoint, must not be <code>null</code>.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
</div>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/EndpointListener.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-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2004&#x2013;2020 <a href="https://www.eclipse.org/">Eclipse Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>