1 package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406;
3 import java.io.IOException;
4 import org.openvpp.jvpp.JVppImpl;
5 import org.openvpp.jvpp.VppJNIConnection;
6 import org.openvpp.jvpp.future.FutureJVppFacade;
7 import org.slf4j.Logger;
8 import org.slf4j.LoggerFactory;
10 public class VppJvppImplModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406.AbstractVppJvppImplModule {
12 private static final Logger LOG = LoggerFactory.getLogger(VppJvppImplModule.class);
14 public VppJvppImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
15 super(identifier, dependencyResolver);
18 public VppJvppImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406.VppJvppImplModule oldModule, java.lang.AutoCloseable oldInstance) {
19 super(identifier, dependencyResolver, oldModule, oldInstance);
23 public void customValidation() {
24 // add custom validation form module attributes here.
28 public java.lang.AutoCloseable createInstance() {
30 final JVppImpl jVpp = new JVppImpl(new VppJNIConnection(getName()));
31 LOG.info("JVpp connection opened successfully as: {}", getName());
32 return new FutureJVppFacade(jVpp) {
34 public void close() throws Exception {
36 LOG.info("Closing JVpp connection: {}", getName());
40 } catch (IOException e) {
41 throw new IllegalStateException("Unable to open VPP management connection", e);