All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.zulia.server.connection.client.InternalRpcConnectionFactory Maven / Gradle / Ivy

There is a newer version: 1.6.4
Show newest version
package io.zulia.server.connection.client;

import org.apache.commons.pool2.BasePooledObjectFactory;
import org.apache.commons.pool2.PooledObject;
import org.apache.commons.pool2.impl.DefaultPooledObject;

public class InternalRpcConnectionFactory extends BasePooledObjectFactory {

	private String memberAddress;
	private int internalServicePort;

	public InternalRpcConnectionFactory(String memberAddress, int internalServicePort) {
		this.memberAddress = memberAddress;
		this.internalServicePort = internalServicePort;
	}

	@Override
	public InternalRpcConnection create() throws Exception {
		return new InternalRpcConnection(memberAddress, internalServicePort);
	}

	@Override
	public PooledObject wrap(InternalRpcConnection obj) {
		return new DefaultPooledObject<>(obj);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy