io.zulia.server.connection.client.InternalRpcConnectionFactory Maven / Gradle / Ivy
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