import java.util.Collections;
import java.util.List;
import java.util.Locale;
-import java.util.Map;
import org.apache.sshd.common.NamedResource;
+import org.apache.sshd.common.PropertyResolver;
import org.apache.sshd.common.PropertyResolverUtils;
import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.config.keys.AuthorizedKeyEntry;
}
/**
- * Retrieves the server's property map. This is a live map; changing it
- * affects the server.
+ * Retrieves the server's {@link PropertyResolver}, giving access to server
+ * properties.
*
- * @return a live map of the server's properties
+ * @return the {@link PropertyResolver}
* @since 5.9
*/
- public Map<String, Object> getProperties() {
- return server.getProperties();
+ public PropertyResolver getPropertyResolver() {
+ return server;
}
/**
import java.util.List;
import java.util.stream.Collectors;
import org.apache.sshd.client.config.hosts.KnownHostEntry;
+import org.apache.sshd.common.PropertyResolverUtils;
import org.apache.sshd.server.ServerFactoryManager;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.TransportException;
*/
@Test
public void testCloneAndFetchWithSessionLimit() throws Exception {
- server.getProperties().put(ServerFactoryManager.MAX_CONCURRENT_SESSIONS,
- Integer.valueOf(2));
+ PropertyResolverUtils.updateProperty(server.getPropertyResolver(),
+ ServerFactoryManager.MAX_CONCURRENT_SESSIONS, 2);
File localClone = cloneWith("ssh://localhost/doesntmatter",
defaultCloneDir, null, //
"Host localhost", //