X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fclient%2FNetconfClientSession.java;h=9bafe9760ae202cd8c75adfd0aa8a27aafae42ae;hb=0c95d90e91f5a6a07d744b97dcc226c70a22c366;hp=ad50fedf6b564fbef12cfd6f8e3308b717d9515a;hpb=9c9d6e69da3aff2d0576d8c15ea0fa0692595b6d;p=controller.git diff --git a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSession.java b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSession.java index ad50fedf6b..9bafe9760a 100644 --- a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSession.java +++ b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSession.java @@ -9,41 +9,47 @@ package org.opendaylight.controller.netconf.client; import io.netty.channel.Channel; -import org.opendaylight.controller.netconf.util.AbstractNetconfSession; -import org.opendaylight.controller.netconf.util.handler.NetconfEXICodec; -import org.opendaylight.controller.netconf.util.handler.NetconfEXIToMessageDecoder; -import org.opendaylight.controller.netconf.util.handler.NetconfMessageToEXIEncoder; -import org.opendaylight.controller.netconf.util.handler.NetconfMessageToXMLEncoder; -import org.opendaylight.controller.netconf.util.handler.NetconfXMLToMessageDecoder; +import java.util.Collection; +import org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSession; +import org.opendaylight.controller.netconf.nettyutil.handler.NetconfEXICodec; +import org.opendaylight.controller.netconf.nettyutil.handler.NetconfEXIToMessageDecoder; +import org.opendaylight.controller.netconf.nettyutil.handler.NetconfMessageToEXIEncoder; +import org.opendaylight.controller.netconf.nettyutil.handler.NetconfMessageToXMLEncoder; +import org.opendaylight.controller.netconf.nettyutil.handler.NetconfXMLToMessageDecoder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Collection; - -public final class NetconfClientSession extends AbstractNetconfSession { +public class NetconfClientSession extends AbstractNetconfSession { - private static final Logger logger = LoggerFactory.getLogger(NetconfClientSession.class); + private static final Logger LOG = LoggerFactory.getLogger(NetconfClientSession.class); private final Collection capabilities; - public NetconfClientSession(NetconfClientSessionListener sessionListener, Channel channel, long sessionId, - Collection capabilities) { + /** + * Construct a new session. + * + * @param sessionListener + * @param channel + * @param sessionId + * @param capabilities set of advertised capabilities. Expected to be immutable. + */ + public NetconfClientSession(final NetconfClientSessionListener sessionListener, final Channel channel, final long sessionId, + final Collection capabilities) { super(sessionListener, channel, sessionId); this.capabilities = capabilities; - logger.debug("Client Session {} created", toString()); + LOG.debug("Client Session {} created", this); } public Collection getServerCapabilities() { return capabilities; } - @Override protected NetconfClientSession thisInstance() { return this; } @Override - protected void addExiHandlers(NetconfEXICodec exiCodec) { + protected void addExiHandlers(final NetconfEXICodec exiCodec) { // TODO used only in negotiator, client supports only auto start-exi replaceMessageDecoder(new NetconfEXIToMessageDecoder(exiCodec)); replaceMessageEncoder(new NetconfMessageToEXIEncoder(exiCodec));