Added Yang code generation for Multipart messages
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / connection / ConnectionAdapterImpl.java
index 5f670132de9812d8ae5d1c1beb34cb03a77085bb..3136c7fca88a2256753b85eefcae6180d91d6d2a 100644 (file)
@@ -1,10 +1,4 @@
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
 
 package org.opendaylight.openflowjava.protocol.impl.connection;
 
@@ -18,7 +12,6 @@ import java.util.concurrent.TimeUnit;
 
 import org.opendaylight.controller.sal.common.util.RpcErrors;
 import org.opendaylight.controller.sal.common.util.Rpcs;
-import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoInput;
@@ -73,9 +66,9 @@ import com.google.common.util.concurrent.SettableFuture;
 
 /**
  * @author mirehak
- *
+ * @author michal.polkorab
  */
-public class ConnectionAdapterImpl implements ConnectionAdapter, MessageConsumer {
+public class ConnectionAdapterImpl implements ConnectionFacade {
     
     /** after this time, rpc future response objects will be thrown away (in minutes) */
     public static final int RPC_RESPONSE_EXPIRATION = 1;
@@ -107,10 +100,11 @@ public class ConnectionAdapterImpl implements ConnectionAdapter, MessageConsumer
                         notification.getValue().cancel(true);
                     }
                 }).build();
+        LOG.info("ConnectionAdapter created");
     }
     
     /**
-     * @param channel the channel to set
+     * @param channel the channel to be set - used for communication
      */
     public void setChannel(Channel channel) {
         this.channel = channel;
@@ -248,6 +242,7 @@ public class ConnectionAdapterImpl implements ConnectionAdapter, MessageConsumer
             } else if (message instanceof FlowRemovedMessage) {
                 messageListener.onFlowRemovedMessage((FlowRemovedMessage) message);
             } else if (message instanceof HelloMessage) {
+                LOG.info("Hello received / branch");
                 messageListener.onHelloMessage((HelloMessage) message);
             } else if (message instanceof MultipartReplyMessage) {
                 messageListener.onMultipartReplyMessage((MultipartReplyMessage) message);