package io.nem.apps.factories;

import org.nem.core.connect.ErrorResponseDeserializerUnion;
import org.nem.core.connect.HttpMethodClient;
import org.nem.core.connect.client.DefaultAsyncNemConnector;
import org.nem.core.model.Account;
import org.nem.core.node.ApiId;




/**
 * A factory for creating Connector objects.
 */
public class ConnectorFactory {

	/** The Constant CLIENT. */
	private static final HttpMethodClient<ErrorResponseDeserializerUnion> CLIENT = createHttpMethodClient();

	/**
	 * Creates a new Connector object.
	 *
	 * @return the default async nem connector< api id>
	 */
	public static DefaultAsyncNemConnector<ApiId> createConnector() {
		final DefaultAsyncNemConnector<ApiId> connector = new DefaultAsyncNemConnector<>(CLIENT, r -> {
			throw new RuntimeException();
		});
		connector.setAccountLookup(Account::new);
		return connector;
	}

	/**
	 * Creates a new Connector object.
	 *
	 * @return the http method client< error response deserializer union>
	 */
	private static HttpMethodClient<ErrorResponseDeserializerUnion> createHttpMethodClient() {
		final int connectionTimeout = 4000;
		final int socketTimeout = 10000;
		final int requestTimeout = 30000;
		return new HttpMethodClient<>(connectionTimeout, socketTimeout, requestTimeout);
	}
}
@@ -783,16 +783,28 @@
 ception(
+r.toString()
 );%0A%09%09%7D);
@@ -1281,8 +1281,9 @@
 t);%0A%09%7D%0A%7D
+%0A

Update ConnectorFactory.java