Move logging out of try/catch block
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / handler / ssh / client / NetconfSessionFactory.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netconf.nettyutil.handler.ssh.client;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.netconf.shaded.sshd.client.ClientFactoryManager;
12 import org.opendaylight.netconf.shaded.sshd.client.session.SessionFactory;
13 import org.opendaylight.netconf.shaded.sshd.common.io.IoSession;
14
15 /**
16  * A {@link SessionFactory} which creates {@link NetconfClientSessionImpl}s.
17  */
18 @Beta
19 public class NetconfSessionFactory extends SessionFactory {
20     public NetconfSessionFactory(final ClientFactoryManager client) {
21         super(client);
22     }
23
24     @Override
25     protected NetconfClientSessionImpl doCreateSession(final IoSession ioSession) throws Exception {
26         return new NetconfClientSessionImpl(getClient(), ioSession);
27     }
28 }