Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
f6dd3d4d
Commit
f6dd3d4d
authored
Apr 20, 2023
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API呼び出し失敗時にリトライするようにした。
parent
252457ed
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
10 deletions
+19
-10
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
+14
-8
ABVJE_BL/src/jp/agentec/adf/net/http/HttpRequestSender.java
+2
-2
ABVJE_Res_Default_Android/res/values-ja/strings.xml
+1
-0
ABVJE_Res_Default_Android/res/values/strings.xml
+2
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
View file @
f6dd3d4d
...
...
@@ -832,11 +832,15 @@ public class AcmsClient implements AcmsClientResponseListener {
Logger
.
d
(
TAG
,
"[url : %s], [param : %s]"
,
apiUrl
,
param
==
null
?
""
:
param
.
toHttpParameterString
());
HttpTaskWorker
<
HttpParameterObject
>
httpTaskThread
=
n
ew
HttpTaskWorker
<
HttpParameterObject
>(
methodName
,
apiUrl
,
param
)
;
HttpTaskWorker
<
HttpParameterObject
>
httpTaskThread
=
n
ull
;
try
{
httpTaskThread
.
start
();
httpTaskThread
.
join
(
HttpRequestSender
.
DefaultConnectionTimeout
);
long
t
=
HttpRequestSender
.
DefaultConnectionTimeout
*
2
;
for
(
int
i
=
0
;
i
<
3
;
i
++,
t
*=
2
)
{
httpTaskThread
=
new
HttpTaskWorker
<
HttpParameterObject
>(
methodName
,
apiUrl
,
param
);
httpTaskThread
.
start
();
httpTaskThread
.
join
(
t
);
}
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
e
);
Logger
.
d
(
TAG
,
ExceptionDetailMessage
.
SERVER_IS_DISCONNECTED
);
...
...
@@ -880,12 +884,14 @@ public class AcmsClient implements AcmsClientResponseListener {
}
String
apiUrl
=
url
;
HttpMultipartTaskWorker
<
HttpMultipart
>
httpTaskThread
=
new
HttpMultipartTaskWorker
<
HttpMultipart
>(
apiUrl
,
param
);
HttpMultipartTaskWorker
<
HttpMultipart
>
httpTaskThread
=
null
;
try
{
httpTaskThread
.
start
();
httpTaskThread
.
join
(
HttpRequestSender
.
DefaultConnectionTimeout
);
long
t
=
HttpRequestSender
.
DefaultConnectionTimeout
*
2
;
for
(
int
i
=
0
;
i
<
3
;
i
++,
t
*=
2
)
{
httpTaskThread
=
new
HttpMultipartTaskWorker
<
HttpMultipart
>(
apiUrl
,
param
);
httpTaskThread
.
start
();
httpTaskThread
.
join
(
t
);
}
}
catch
(
Exception
e
)
{
Logger
.
d
(
TAG
,
ExceptionDetailMessage
.
SERVER_IS_DISCONNECTED
);
// サーバとの通信中、予期せぬ問題が発生しました。(1)
...
...
ABVJE_BL/src/jp/agentec/adf/net/http/HttpRequestSender.java
View file @
f6dd3d4d
...
...
@@ -42,10 +42,10 @@ public class HttpRequestSender {
/**
* ホストに接続するまでのタイムアウト時間をミリ秒で設定します。<br>
* デフォルトは
20,000ミリ秒(20
秒)です。
* デフォルトは
5,000ミリ秒(5
秒)です。
* @since 1.0.0
*/
public
static
final
int
DefaultConnectionTimeout
=
20
*
1000
;
public
static
final
int
DefaultConnectionTimeout
=
5
*
1000
;
/**
* 通信に利用する既定の文字セットです。UTF-8となります。
* @since 1.0.0
...
...
ABVJE_Res_Default_Android/res/values-ja/strings.xml
View file @
f6dd3d4d
...
...
@@ -1462,4 +1462,5 @@
<string
name=
"msg_permission_dialog_bluetooth"
>
Bluetooth利用権限が必要です。\nアプリ設定画面へ遷移します。
</string>
<string
name=
"dashboard"
>
ダッシュボード
</string>
<string
name=
"failed_get_master_data"
>
マスタデータの取得に失敗しました。画面を更新してください。
</string>
</resources>
ABVJE_Res_Default_Android/res/values/strings.xml
View file @
f6dd3d4d
...
...
@@ -1475,4 +1475,5 @@
<string
name=
"msg_permission_dialog_bluetooth"
>
Bluetooth usage authority is required. \n To transition to the application setting screen.
</string>
<string
name=
"dashboard"
>
Dashboard
</string>
<string
name=
"failed_get_master_data"
>
Failed to get master data. Refresh Home screen.
</string>
</resources>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment