3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.protocol_plugin.openflow.core;
12 import java.util.List;
14 import org.openflow.protocol.OFMessage;
17 * This interface defines low level routines to read/write messages on an open
18 * socket channel. If secure communication is desired, these methods also perform
19 * encryption and decryption of the network data.
21 public interface IMessageReadWrite {
23 * Sends the OF message out over the socket channel. For secure
24 * communication, the data will be encrypted.
26 * @param msg OF message to be sent
29 public void asyncSend(OFMessage msg) throws Exception;
32 * Resumes sending the remaining messages in the outgoing buffer
35 public void resumeSend() throws Exception;
38 * Reads the incoming network data from the socket and retrieves the OF
39 * messages. For secure communication, the data will be decrypted first.
41 * @return list of OF messages
44 public List<OFMessage> readMessages() throws Exception;
47 * Proper clean up when the switch connection is closed
52 public void stop() throws Exception;