updated message dispatcher to send the multipart request message to library
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / ConnectionConfigurationFactory.java
1 /**
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.openflowplugin.openflow.md.core;
10
11 import java.net.InetAddress;
12
13 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionConfiguration;
14
15 /**
16  * @author mirehak
17  */
18 public abstract class ConnectionConfigurationFactory {
19
20     /** OF default listening port */
21     private static final int DEFAULT_OF_PORT = 6653;
22     /** OF legacy default listening port */
23     private static final int LEGACY_OF_PORT = 6633;
24
25     /**
26      * @return default connection configuration
27      */
28     public static ConnectionConfiguration getDefault() {
29         return new ConnectionConfiguration() {
30
31             @Override
32             public InetAddress getAddress() {
33                 // all interfaces
34                 return null;
35             }
36
37             @Override
38             public int getPort() {
39                 return DEFAULT_OF_PORT;
40             }
41
42             @Override
43             public FEATURE_SUPPORT getTlsSupport() {
44                 return FEATURE_SUPPORT.NOT_SUPPORTED;
45             }
46
47             @Override
48             public Object getTransferProtocol() {
49                 // TODO:: TCP/UDP ...
50                 return null;
51             }
52
53             @Override
54             public long getSwitchIdleTimeout() {
55                 return 5000;
56             }
57
58             @Override
59             public Object getSslContext() {
60                 return null;
61             }
62         };
63     }
64
65 }