import java.net.InetAddress;
import java.net.InetSocketAddress;
+import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
import org.opendaylight.openflowjava.protocol.impl.connection.ServerFacade;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public static enum COMPONENT_NAMES {
/**
- * First component in pipeline - detecting TLS connections
+ * Detects switch idle state
+ */
+ IDLE_HANDLER,
+ /**
+ * Detects TLS connections
*/
TLS_DETECTOR,
/**
return channelInitializer;
}
- /**
- * Sets and starts TCPHandler.
- *
- * @param args
- * @throws Exception
- */
- public static void main(String[] args) throws Exception {
- int port;
- if (args.length > 0) {
- port = Integer.parseInt(args[0]);
- } else {
- port = 6633;
- }
- new Thread(new TcpHandler(port)).start();
- }
-
@Override
public ListenableFuture<Boolean> getIsOnlineFuture() {
return isOnlineFuture;
public String getAddress() {
return address;
}
+
+ /**
+ * @param switchConnectionHandler
+ */
+ public void setSwitchConnectionHandler(
+ SwitchConnectionHandler switchConnectionHandler) {
+ channelInitializer.setSwitchConnectionHandler(switchConnectionHandler);
+ }
+
+ public void setSwitchIdleTimeout(long switchIdleTimeout) {
+ channelInitializer.setSwitchIdleTimeout(switchIdleTimeout);
+ }
}