HTTP adapter definition file

Format

[adphttp.protocol.encoding-type=Encoding format]
[adphttp.protocol.connect-timeout=Connection timeout time]
[adphttp.protocol.read-timeout=Reading timeout time]
[adphttp.protocol.chunked-encoding-size=Chunk size]
[adphttp.protocol.https-server-authentication={true|false}]
[adphttp.protocol.https-hostname-verification={true|false}]

[adphttp.file.read-lock.retry.count=Lock retry count in case of failure in shared lock acquisition]
[adphttp.file.read-lock.retry.interval=Lock retry interval in case of failure in shared lock acquisition]

[adphttp.data-size-limit.body-message=Maximum size of HTTP response body]
[adphttp.data-size-limit.file=Maximum size for file]

[adphttp.response-code.normal=Status code treated as normal processing]
[adphttp.response-code.fault=Status code treated as faulty processing]

[adphttp.auto-delete-incomplete-file={true|false}]

Function

Sets up the operating information of HTTP adapter.

Create HTTP adapter definition file with file name as "cscadphttp.properties".

The contents that you have specified in HTTP adapter definition file become effective when HTTP adapter starts.

File saving destination

<Service platform installation directory>\CSC\custom-adapter\HTTP\config\templates\cscadphttp.properties

Note
The file saved here is a template file. After copying this template file to any directory, edit the file and then create definition file.

Properties that you can set

(1) Properties related to protocol operation specification

adphttp.protocol.encoding-type=Encoding format ~((gzip))

Specify the encoding format for the HTTP body to be sent and received. "gzip" is the only encoding format that you can specify. This format is not case-sensitive. Encoding format is not defined by default.

Specify this property only when sending or receiving HTTP body in gzip format. When you do not want to send or receive HTTP body in gzip format, comment out or delete this property.

adphttp.protocol.connect-timeout=Connection timeout time ~<Number>((0 or between1 and 2147483647))<<60000>>

Specify connection timeout time in milliseconds. Connection does not timeout if you have specified 0 in the value.

adphttp.protocol.read-timeout=Read timeout time ~<Number>((0 or between 1 and 2147483647))<<300000>>

Specify read timeout time in milliseconds. Connection does not timeout if you have specified 0 in the value.

adphttp.protocol.chunked-encoding-size=Chunk size ~<Number>((0 or between 1 and 2147483647))<<0>>

Specify chunk size for sending chunk, in bytes unit. Specify 0 when you do not want to send chunk.

Specify the chunk size as "4096" and increase or decrease it as and when required. When you specify any value for chunk size, consider the following points according to the environment to be used:

adphttp.protocol.https-server-authentication={true|false} <<true>>

Specify if server is to be validated during HTTPS communication. This property is not case sensitive.

adphttp.protocol.https-hostname-verification={true|false} ~<<true>>

Specify whether to verify the host during HTTPS communication. This property is not case sensitive.

(2) Properties related to exclusive file access acquisition

adphttp.file.read-lock.retry.count=Lock retry count in case of failure in shared lock acquisition ~<Number>((0-1024))<<0>>

Specify the count of lock retries when there is a failure in acquiring shared lock for common folder.

adphttp.file.read-lock.retry.interval=Lock retry interval count in case of failure in shared lock acquisition~<Number>((1-1024))<<1>>

Specify the interval between lock retries when there is a failure in acquiring shared lock for common folder.

(3) Properties related to data size control

adphttp.data-size-limit.body-message=Maximum size of HTTP response body ~<Number>((Between -1 and 2147483647))<<-1>>

Specify the maximum size of data to be allowed when setting up HTTP response in response message (body), in bytes unit. If you specify -1, data size is not restricted.

adphttp.data-size-limit.file=Maximum size for file ~<Number>(Between -1 and 2147483647))<<-1>>

Specify the maximum size of data to be allowed when writing HTTP response to file, in bytes unit. If you have specified-1 in the value, data size is not restricted.

(4) Properties related to response code

adphttp.response-code.normal=Status code treated as normal processing ~<3-digit status code><<200>>

Specify a 3-digit status code, which is to be treated as normal process. When HTTP response of the specified status code is returned to HTTP adapter, status code is processed in a response message.

Status code is treated as normal process, fault process and system exception according to the judgment criteria. For details on the judgment criteria, see the description for setting normal process or fault process in status code, under "2.14.4 Relationship between HTTP responses and response messages" in "Service Platform Overview".

Specify multiple status codes in regular expression. The following snippet shows a setting example when a 200-series status code is treated as normal process.

adphttp.response-code.normal=2[0-9][0-9]

If a status code, which is not set to normal process or fault process, is passed to HTTP adapter the status code will become a system exception.

adphttp.response-code.fault=Status code treated as faulty processing ~<3-digit status code>

Specify a 3-digit status code which is to be treated as faulty processing. When the HTTP response of the status code specified here is returned to HTTP adapter, the status code is processed in a fault message. If you do not specify any value, the status code is not set.

Status code is treated as normal process, fault process and system exception according to the judgment criteria. For details on the judgment criteria, see the description for setting normal process or fault process in status code, under "2.14.4 Relationship between HTTP responses and response messages" in "Service Platform Overview".

Specify multiple status codes in regular expression. The following snippet shows a setting example, in which, all the status codes except the status codes specified in adphttp.response-code.normal property, are considered as fault response.

adphttp.response-code.fault=[1-9][0-9][0-9]

If a status code, which is not set to normal process or fault process, is passed to HTTP adapter the status code will become a system exception.

(5) Properties related to extension function

adphttp.auto-delete-incomplete-file={true|false} ~<<true>>

Specify whether to automatically delete the received files, in incomplete files are generated in common folder or work folder due to errors like network fault, I/O error or exceeded data size limit. This property is not case-sensitive.

Select true, when you want to avoid storage consumption due to received incomplete files and select false, when you prefer to save (hold) the state when a fault occurs.

When the received incomplete files are not automatically deleted, to make sure that the free space in storage is not exhausted, you must manually delete the unwanted files as and when required. For details on how to delete, see "5.4.20 Deleting the work folder" and "5.4.22 Deleting files in the common folder" in "Service Platform System Setup and Operation Guide".

Example described

An example of description is as follows:

adphttp.protocol.encoding-type=gzip
adphttp.protocol.connect-timeout=60000
adphttp.protocol.read-timeout=300000
adphttp.protocol.chunked-encoding-size=0
adphttp.protocol.https-server-authentication=true
adphttp.protocol.https-hostname-verification=true
adphttp.file.read-lock.retry.count=0
adphttp.file.read-lock.retry.interval=1
adphttp.data-size-limit.body-message=-1
adphttp.data-size-limit.file=-1
adphttp.response-code.normal=200
adphttp.response-code.fault=500
adphttp.auto-delete-incomplete-file=true

Note

Save property file character code to UTF-8. If you use a character code apart from UTF-8, the setting values may not be interpreted correctly.