Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Hyunsun Moon
2016-06-22 14:41:48 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
abef28b5f2aca9ce1db2f7e775b13649b0612ca0
abef28b5
1 parent
f91909f4
Set REST API request timeout
Change-Id: I448399e75fffe050d2f638cca5f14390125c4910
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
apps/xosclient/BUCK
apps/xosclient/pom.xml
apps/xosclient/src/main/java/org/onosproject/xosclient/impl/XosApi.java
apps/xosclient/BUCK
View file @
abef28b
...
...
@@ -4,6 +4,7 @@ COMPILE_DEPS = [
'//lib:openstack4j-core',
'//lib:openstack4j-http-connector',
'//lib:openstack4j-httpclient',
'//lib:jersey-client',
]
osgi_jar_with_tests (
...
...
apps/xosclient/pom.xml
View file @
abef28b
...
...
@@ -49,6 +49,10 @@
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.glassfish.jersey.core
</groupId>
<artifactId>
jersey-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.pacesys
</groupId>
<artifactId>
openstack4j-core
</artifactId>
<version>
2.11
</version>
...
...
apps/xosclient/src/main/java/org/onosproject/xosclient/impl/XosApi.java
View file @
abef28b
...
...
@@ -15,6 +15,7 @@
*/
package
org
.
onosproject
.
xosclient
.
impl
;
import
org.glassfish.jersey.client.ClientProperties
;
import
org.onosproject.xosclient.api.XosAccess
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -42,6 +43,8 @@ public class XosApi {
protected
final
XosAccess
access
;
protected
final
Client
client
;
private
static
final
int
DEFAULT_TIMEOUT_MS
=
2000
;
/**
* Default constructor.
*
...
...
@@ -52,6 +55,9 @@ public class XosApi {
this
.
baseUrl
=
baseUrl
;
this
.
access
=
xosAccess
;
this
.
client
=
ClientBuilder
.
newClient
();
client
.
property
(
ClientProperties
.
CONNECT_TIMEOUT
,
DEFAULT_TIMEOUT_MS
);
client
.
property
(
ClientProperties
.
READ_TIMEOUT
,
DEFAULT_TIMEOUT_MS
);
}
/**
...
...
Please
register
or
login
to post a comment