d0a76c8f95884d75f15ad81dbd4f67565f2748a7
[openflowjava.git] / openflow-protocol-it / src / test / java / org / opendaylight / openflowjava / protocol / it / integration / ConnectionConfigurationImpl.java
1 /*
2  * Copyright (c) 2013 Pantheon Technologies s.r.o. 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.openflowjava.protocol.it.integration;
10
11 import java.net.InetAddress;
12
13 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionConfiguration;
14 import org.opendaylight.openflowjava.protocol.api.connection.ThreadConfiguration;
15 import org.opendaylight.openflowjava.protocol.api.connection.TlsConfiguration;
16
17 /**
18  * @author michal.polkorab
19  *
20  */
21 public class ConnectionConfigurationImpl implements ConnectionConfiguration {
22
23     private InetAddress address;
24     private int port;
25     private Object transferProtocol;
26     private TlsConfiguration tlsConfig;
27     private long switchIdleTimeout;
28     private ThreadConfiguration threadConfig;
29
30     /**
31      * Creates {@link ConnectionConfigurationImpl}
32      * @param address 
33      * @param port
34      * @param tlsConfig 
35      * @param switchIdleTimeout
36      */
37     public ConnectionConfigurationImpl(InetAddress address, int port, TlsConfiguration tlsConfig, long switchIdleTimeout) {
38         this.address = address;
39         this.port = port;
40         this.tlsConfig = tlsConfig;
41         this.switchIdleTimeout = switchIdleTimeout;
42     }
43
44     @Override
45     public InetAddress getAddress() {
46         return address;
47     }
48
49     @Override
50     public int getPort() {
51         return port;
52     }
53
54     @Override
55     public Object getTransferProtocol() {
56         return transferProtocol;
57     }
58
59     @Override
60     public long getSwitchIdleTimeout() {
61         return switchIdleTimeout;
62     }
63
64     @Override
65     public Object getSslContext() {
66         // TODO Auto-generated method stub
67         return null;
68     }
69
70     @Override
71     public TlsConfiguration getTlsConfiguration() {
72         return tlsConfig;
73     }
74
75     @Override
76     public ThreadConfiguration getThreadConfiguration() {
77         return threadConfig;
78     }
79
80     /**
81      * @param threadConfig thread model configuration (configures threads used)
82      */
83     public void setThreadConfiguration(ThreadConfiguration threadConfig) {
84         this.threadConfig = threadConfig;
85     }
86 }