uCosminexus Application Server, Web Service Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
setConnectTimeout(Integer interval) method
Description
This method sets the connection timeout in milliseconds.
This method functions in the same manner as when you set the ClientConfig.PROPERTY_CONNECT_TIMEOUT property in the property map acquired with the getProperties() method.
Syntax
public void setConnectTimeout(Integer interval)
Parameter
- interval
- This is the connection timeout value. If you specify null or 0, the connection does not time out.
Return value
Notes
- The client operation based on the value specified in the interval parameter is the same as that for the setConnectTimeout() method of the HttpURLConnection class. For details, see the JDK documentation.
- The JAX-RS engine does not validate the value specified in the interval parameter. Prior to the HTTP communication, the value will be copied as is to HttpURLConnection. To specify a value in the interval parameter, follow the description of the setConnectTimeout() method of the HttpURLConnection class of Java SE.
- If the client property map already contains the value specified in ClientConfig.PROPERTY_CONNECT_TIMEOUT, the value specified in the interval parameter is overwritten.
- If an exception is thrown during the processing of an HTTP request or an HTTP response due to the value specified in the interval parameter, an error (KDJJ18888-E) occurs and the ClientHandlerException exception that wraps this exception is thrown.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.