# Jini Discovery Utilities
Apache River v3.0.0 Release Notes

### Description

The Jini discovery utilities contain a set of discovery management interfaces that define the policies to apply when implementing helper utilities that manage an entity's discovery duties: in particular, the management of multicast (group) discovery and unicast (locator) discovery. The discovery management interfaces are:

- `net.jini.discovery.DiscoveryManagement`
- `net.jini.discovery.DiscoveryGroupManagement`
- `net.jini.discovery.DiscoveryLocatorManagement`

The discovery utilities also include a set of standard helper utility classes that implement one or more of the discovery management interfaces. The helper utility classes are:

- `net.jini.discovery.LookupDiscovery`
- `net.jini.discovery.LookupLocatorDiscovery`
- `net.jini.discovery.LookupDiscoveryManager`

Additional classes and packages:

- `net.jini.discovery.ConstrainableLookupLocator`
- `org.apache.river.discovery`

The Jini Discovery Utilities Specification is available in html.

### Changes since the v2.2.0 release

None

### Changes since the v2.1.1 release

- [RIVER-17] - Misleading logging message when discovery constraint checking is delayed
- [RIVER-245] - Unicast discovery should close socket in case of connection exception.

### Changes since the v2.0.1 release

API additions and changes
  Changes to the `net.jini.discovery` package.
  - Parsing of the input URL and host name arguments in the corresponding `ConstrainableLookupLocator` and `LookupLocator` constructors has been made stricter; this may generate new `MalformedURLException`s. Note that the implementation does not conform to the DJ 3.0 specification, which requires parsing according to RFC 2396. The implementation is more permissive and allows characters such as `'_'` in host names to minimize backward incompatibility issues and anticipate compliance with RFC 3986 (which obsoletes RFC 2396).
  - `ConstrainableLookupLocator` handles `ConnectionAbsoluteTime` and `ConnectionRelativeTime` constraints, enabling the specification of timeouts on unicast discovery connection attempts.
  - `LookupLocatorDiscovery` handles any `ConnectionRelativeTime` and `ConnectionAbsoluteTime` constraints that may be set on the `LookupLocator`s passed into its constructors.
  - The `LookupDiscovery`, `LookupLocator`, `ConstrainableLookupLocator`, and `LookupLocatorDiscovery` classes now try all the IP addresses that a given host name may resolve to, instead of just the first one. This is as per the recommendations in RFC 1123.

  Changes to the `org.apache.river.discovery` package.

  - The `Discovery` class now enables constraint checking to be optionally delayed. With this change, constraint checks need not be performed as part of multicast announcement or request decoding. Discovery providers that support delayed constraint checking must implement the new `MulticastAnnouncementDecoder` and `MulticastRequestDecoder` interfaces.
  - The `DiscoveryConstraints` class supports processing of `ConnectionRelativeTime` and `ConnectionAbsoluteTime` constraints. Note that the processed constraints will no longer return `ConnectionRelativeTime` and `ConnectionAbsoluteTime` `ConnectionRelativeTime` and `ConnectionAbsoluteTime` constraints. Note that the processed constraints will no longer return `ConnectionRelativeTime` and `ConnectionAbsoluteTime` as unfulfilled constraints.

Configuration
  The current implementation of the `LookupDiscovery` utility now allows `ConnectionRelativeTime` and `ConnectionAbsoluteTime` as part of its discovery constraints.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.