Java 如何在apache camel中覆盖套接字超时或连接超时的默认值?

Java 如何在apache camel中覆盖套接字超时或连接超时的默认值?,java,rest,apache-camel,Java,Rest,Apache Camel,在java中使用apache camel 2.12.4版时,我面临一个socketTimeoutException:当我在30秒内未收到响应时,读取restful web服务的一次超时。我想在RestletEndpoint类中更改默认的sockeTimeout和connectTimeout值,RestletEndpoint类是camel jar的一部分 我在我的camel路由器中使用restlet,如下所示 routeDefinition = from( "res

在java中使用apache camel 2.12.4版时,我面临一个socketTimeoutException:当我在30秒内未收到响应时,读取restful web服务的一次超时。我想在RestletEndpoint类中更改默认的sockeTimeout和connectTimeout值,RestletEndpoint类是camel jar的一部分

我在我的camel路由器中使用restlet,如下所示

routeDefinition = from(
                "restlet:/AccountInfo/getAccountDetails?socketTimeout=900000&connectTimeout=900000&threadMaxIdleTimeMs=900000&restletMethods=POST&restletBinding=#queryStringToHeadersRestletBinding")
                .process(getAccountDetailsFromProcessor);
我尝试在上述参数中设置socketTimeoutconnectTimeout

我发现下面是camel jar中的一个类,但不知道如何重写这些默认值

public class RestletEndpoint extends DefaultEndpoint implements HeaderFilterStrategyAware {

    private static final int DEFAULT_PORT = 80;
    private static final String DEFAULT_PROTOCOL = "http";
    private static final String DEFAULT_HOST = "localhost";
    private static final int DEFAULT_SOCKET_TIMEOUT = 30000;
    private static final int DEFAULT_CONNECT_TIMEOUT = 30000;

这些超时在您使用to(“restlet”)而不是from(“restlet”)时使用。这些超时在您使用to(“restlet”)而不是from(“restlet”)时使用