1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
3 package org.opendaylight.openflowjava.protocol.api.connection;
5 import java.util.concurrent.Future;
7 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolListener;
8 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolService;
9 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.system.rev130927.SystemNotificationsListener;
13 * @author michal.polkorab
15 public interface ConnectionAdapter extends OpenflowProtocolService {
18 * disconnect corresponding switch
19 * @return future set to true, when disconnect completed
21 public Future<Boolean> disconnect();
24 * @return true, if connection to switch is alive
26 public boolean isAlive();
29 * @param messageListener here will be pushed all messages from switch
31 public void setMessageListener(OpenflowProtocolListener messageListener);
34 * @param systemListener here will be pushed all system messages from library
36 public void setSystemListener(SystemNotificationsListener systemListener);
39 * Throws exception if any of required listeners is missing
41 public void checkListeners();