* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.netconf.client;
import com.google.common.base.Strings;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-public class NetconfClientSessionNegotiator extends
- AbstractNetconfSessionNegotiator<NetconfClientSessionPreferences, NetconfClientSession,
+// Non-final for mocking
+class NetconfClientSessionNegotiator
+ extends AbstractNetconfSessionNegotiator<NetconfClientSessionPreferences, NetconfClientSession,
NetconfClientSessionListener> {
private static final Logger LOG = LoggerFactory.getLogger(NetconfClientSessionNegotiator.class);
private static final Interner<Set<String>> INTERNER = Interners.newWeakInterner();
- protected NetconfClientSessionNegotiator(final NetconfClientSessionPreferences sessionPreferences,
- final Promise<NetconfClientSession> promise,
- final Channel channel,
- final Timer timer,
- final NetconfClientSessionListener sessionListener,
- final long connectionTimeoutMillis) {
+ NetconfClientSessionNegotiator(final NetconfClientSessionPreferences sessionPreferences,
+ final Promise<NetconfClientSession> promise, final Channel channel, final Timer timer,
+ final NetconfClientSessionListener sessionListener, final long connectionTimeoutMillis) {
super(sessionPreferences, promise, channel, timer, sessionListener, connectionTimeoutMillis);
}
@SuppressWarnings("checkstyle:IllegalCatch")
+ @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST",
+ justification = "SpotBugs does not understand generic cast of sessionPreferences")
@Override
- @SuppressFBWarnings("BC_UNCONFIRMED_CAST")
protected void handleMessage(final NetconfHelloMessage netconfMessage) throws NetconfDocumentedException {
if (!ifNegotiatedAlready()) {
LOG.debug("Server hello message received, starting negotiation on channel {}", channel);
});
}
- @SuppressFBWarnings("BC_UNCONFIRMED_CAST")
+ @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST",
+ justification = "SpotBugs does not understand generic cast of sessionPreferences")
private boolean shouldUseExi(final NetconfHelloMessage helloMsg) {
return containsExi10Capability(helloMsg.getDocument())
&& containsExi10Capability(sessionPreferences.getHelloMessage().getDocument());